Skip to content

Improve reStructuredText language file

Lots of fixes to get the reStructuredText highlighting up to snuff. I opted for many commits since this is still incomplete and having small incremental changes should hopefully help the next person that wants to improve things.

There is one corner case I haven't been able to figure out that hopefully someone more experienced can help me with. reStructuredText has two constructs that have the same start characters, but differ in the terminating sequence. Since they are also multiline I couldn't figure out to do that within GtkSourceView's framework.

Example:

`This is the
first item`

`This is the
second item`_

`This is the
third item`_

`This is the
fourth item`

If I do simple context with start and end tags then one variant will end up gobbling up the other one. I tried nesting things with the common start as the parent and the endings at children. But then the style only applies to the ending and not to the entire thing.

Would appreciate some help here. For now I've merged these two in to a common construct (commit "Handle interpreted markup").

Merge request reports