pygments-mathematica icon indicating copy to clipboard operation
pygments-mathematica copied to clipboard

Backslash at the end of string causes wrong coloring

Open yuriever opened this issue 2 years ago • 0 comments

Thanks for the useful highlighter!

The minimal example is

``` wl
"\"a
```

which will be rendered as a whole string instead of string with the rest expression,

<div class="highlight"><pre id="__code_3"><span></span><code><span class="s">"\"a</span></code></pre></div>
image

Only after inserting some character to avoid escaping we can get the expected coloring,

``` wl
"\ "a
```
<div class="highlight"><pre id="__code_3"><span></span><code><span class="s">"\ "</span><span class="nv">a</span>
</code></pre></div>
image

Could you fix this issue?

yuriever avatar Feb 01 '23 21:02 yuriever