sublime_diagram_plugin icon indicating copy to clipboard operation
sublime_diagram_plugin copied to clipboard

syntax highlighting triggers on apostrophe

Open nmz787 opened this issue 6 years ago • 2 comments

if I have a lines like this:

:don't break the code!|
:you're coding all night|

the text between the apostrophe's is assumed to be a quote. In this example the highlighting stops on the second line, but in my specific case I only had one apostrophe and no more after for 10 lines or more... so the entire remainder of the document is highlighted yellow as a result.

nmz787 avatar Feb 01 '19 20:02 nmz787

I think this might fix it:

- match: (?:^[^:])\'
      scope: string.quoted.single.source.wsd
      push:
        - meta_scope: string.quoted.single.source.wsd
        - match: \'
          pop: true

nmz787 avatar Feb 01 '19 20:02 nmz787

but really I guess the regex should be asserting that a quoted line ends with a quote OR fails if it finds a line-ending character like ; or |

nmz787 avatar Feb 01 '19 20:02 nmz787