Skip to content

Commit

Permalink
Fix regex to optionally ignore quoted strings when checking for Text.…
Browse files Browse the repository at this point in the history
…lineColor annotation

See modelica/ModelicaStandardLibrary#4183
  • Loading branch information
tobolar committed Sep 22, 2023
1 parent 845d6d7 commit 5d9dec8
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 5d9dec8

Please sign in to comment.