New leading/trailing whitespace syntax incorrectly detected as Ruby
noinkling opened this issue · 0 comments
noinkling commented
The old ='
syntax works fine, but in the newer =>
syntax the >
gets detected as Ruby. There's a bunch of possible combinations too:
=<
=>
=<>
=><
=<'
='<
plus all the double-equals (==
) variants of these.
The relevant regex is at line 559 here. I think something like this would work:
(==|=)(<>|><|<'|'<|<|>|')?|-
(except with the pointy brackets XML-escaped). I tried making it more elegant than that but it was difficult not making it match =<<
, =''
, etc.
Edit: I opened a PR (#43).