Skip to content

Commit

Permalink
refs #4181 Fix regex to optionally ignore quoted strings
Browse files Browse the repository at this point in the history
Previously, a Text.lineColor annotation was not detected, if there was a closing parenthesis (within a quoted Text.textString annotation), e.g.

```
Text(extent={{-100,80},{-80,60}}, textString="1)", lineColor={0,0,255})
```
  • Loading branch information
beutlich committed Aug 16, 2023
1 parent ce36c07 commit 8c0bf7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .CI/check_deprecated_line_color.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

'''
Copyright (C) 2021, Modelica Association and contributors
Copyright (C) 2021-2023, Modelica Association and contributors
All rights reserved.
Check for deprecated Text.lineColor annotation
Expand All @@ -13,7 +13,7 @@
import re
import sys

PATTERN = re.compile(r'(Text\s*\([^\).]*)lineColor')
PATTERN = re.compile(r'(?:Text\s*\([^\)]*?(?:\"(?:\\.|[^\"])*\")?[^\)]*?)(lineColor)')

def _checkDeprecatedFileLineColor(file_name):
errors = 0
Expand Down

0 comments on commit 8c0bf7d

Please sign in to comment.