tminor / jsonnet-mode

Emacs major mode for editing Jsonnet files.
GNU General Public License v3.0
46 stars 17 forks source link

Multiline string literals not matched correctly #7

Closed benley closed 4 years ago

benley commented 6 years ago

Some examples:

{
  // This gets highlighted as a multiline string, but it should not be:
  foo1: |
    bar
  |;

  // This too:
  foo2: | bar |;

  // This too:
  foo3: = |||||
    bar
  |||||;

  // This one gets interrupted at the | in the middle, and the rest of
  // the file gets highlighted as a string until another | shows up:
  foo4: |||
    bar | this text should still be inside the triple-pipe string
  |||;

  // this line should be a comment but it's highlighted as a string?

  // if I add a single | it ends the incorrect string match

  // now it's back to normal and this is a comment again
}

here's what that looks like in a screenshot:

screenshot from 2018-08-27 16-38-30