marshallward / vim-restructuredtext

Syntax file for reStructuredText on Vim.
26 stars 12 forks source link

Incorrect highlighting when || is not followed by whitespace #61

Open marshallward opened 3 years ago

marshallward commented 3 years ago

(Re-posting on behalf of @philj56 ; original text below)


The following example shows the issue:

.. math:: |E| + 3 |E|+3

The first line highlights correctly, with the + 3 using normal maths highlighting. On the second line, the lack of whitespace causes the |E| highlighting to never end, and carries on through the whole document until another || pair followed by whitespace is found.

Edit: Actually this doesn't just apply to math mode, the same thing happens without the directive.