atom-language icon indicating copy to clipboard operation
atom-language copied to clipboard

Misparse in `sub infix:«"\c[INVISIBLE TIMES]"»` breaks highlights

Open zoffixznet opened this issue 7 years ago • 1 comments

Seems using «"\c[...]"» construct to define routine name busts highlights for the code that follows.

Example Code

sub infix:«"\c[INVISIBLE TIMES]"» { $^a × $^b }
my \r = 42;
say "Area of the circle is " ~ π⁢r²;
# OUTPUT: «Area of the circle is 5541.76944093239␤»

Picture [optional]

untitled

Leave this in. For internal use.

  • [ ] Fixed in Master
  • [ ] Fixed in Release
  • [ ] Has Tests
  • [ ] Passes Tests

zoffixznet avatar Nov 28 '17 11:11 zoffixznet

On closer inspection, it appears it's whitespace inside the term's name that messes these up. Workaround for my case is to drop the doublequotes: sub infix:«\c[INVISIBLE TIMES]» { $^a × $^b }

zoffixznet avatar Nov 28 '17 18:11 zoffixznet