Skip to content

Commit fb68a3f

Browse files
Fix #188: JavaScript highlighting for regex literals breaks highlighting of division operator. Only detect / as start of regex literal if it does not follow any word character, ], ) or }.
1 parent 8fca622 commit fb68a3f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

ICSharpCode.AvalonEdit/Highlighting/Resources/JavaScript-Mode.xshd

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,9 @@
105105
<Begin>/\*</Begin>
106106
<End>\*/</End>
107107
</Span>
108-
<!--<Rule color="Regex">/.*/</Rule>-->
109108
<Span color="Regex">
110-
<Begin>/</Begin>
109+
<Begin>(?&lt;!([})\]\w]+\s*))/</Begin>
111110
<End>/</End>
112-
<RuleSet>
113-
<Span begin="\\/" end="." />
114-
</RuleSet>
115111
</Span>
116112
<Span color="String" multiline="true">
117113
<Begin>"</Begin>

0 commit comments

Comments
 (0)