Skip to content

Commit

Permalink
Fix highlighting breaking when using / with another / on the line
Browse files Browse the repository at this point in the history
Make sure we look back one more character to make sure it's not a number
or a letter.
Needs tests.
Fixes issue #34
  • Loading branch information
samcv committed Dec 29, 2016
1 parent fb6d26b commit a91eeef
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions grammars/perl6fe.cson
Original file line number Diff line number Diff line change
Expand Up @@ -446,10 +446,14 @@
# paren
{
'match': '''(?x)
(?<= ^|[\\s\\(] )
([/]) # Solidus
(.*?) # Regex contents
(?: (?<!\\\\)|(?<=\\\\\\\\) ) (/) # Ending
(?<=
^
| ^\\s
| [\\s\\(] [^\\p{Nd}\\p{L}]
)
([/]) # Solidus
(.*?) # Regex contents
(?: (?<!\\\\)|(?<=\\\\\\\\) ) (/) # Ending
'''
'captures':
'1': 'name': 'punctuation.definition.regexp.perl6fe'
Expand Down

0 comments on commit a91eeef

Please sign in to comment.