Skip to content

Commit

Permalink
Fix runaway regex in comment string detection
Browse files Browse the repository at this point in the history
  • Loading branch information
phannebohm committed Mar 15, 2024
1 parent 74d508e commit 2f661a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions syntaxes/modelica.tmGrammar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ patterns:
name: support.type

# Class definitions
- begin: \b(model|class|record|block|package|function)\s+(\w+)\s*((?<!\\)"([^"]*|\\")*(?<!\\)")?
- begin: \b(model|class|record|block|package|function)\s+(\w+)\s*((?<!\\)"([^"]|\\")*(?<!\\)")?
beginCaptures:
1:
name: keyword
Expand Down Expand Up @@ -81,7 +81,7 @@ patterns:
- include: '#annotations'

# Strings
- match: (?<![=+]\s*)((?<!\\)"([^"]*|\\")*(?<!\\)")\s*;
- match: (?<![=+]\s*)((?<!\\)"([^"]|\\")*(?<!\\)")\s*;
captures:
1:
name: comment.line
Expand Down

0 comments on commit 2f661a0

Please sign in to comment.