marshallward / vim-restructuredtext

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

Code syntax highlighting for incorrectly indented code blocks #3

Open marshallward opened 8 years ago

marshallward commented 8 years ago

Code blocks which are correctly formatted are also correctly syntax highlighted, but incorrect blocks are also being highlighted. For example, in the following

1. Bullet point text

   .. code:: c

   int main(void) {}

2. More bullet point text

the C code should be indented if it to be considered (e.g. aligned to the code label) if it is to be formatted as inside the code block, but the syntax file is incorrecting highlighting the C code as if it were a valid indent. Most docutils would correctly parse this as an empty code block.

anntzer commented 6 years ago

A similar case: screenshot_20180130_221922

will look into it...