This problem is seen in Geany 1.36 on Windows 10 (using GTK+ v2.24.32 and GLib
v2.60.6 runtime libraries).
Markdown syntax highlighting is confused, when code block (exactly: the code block's end marks) is indented.
All the text after code block end is blue and ignores all following markdown syntax highlighting.
(When code block's end is not indented, everything is ok.)
Note: The markdown version I use is of pandoc and the indentation is correct according to it -- It is needed (in this example) for making the code block be a part of the list item.
Bug reports should include an example file as a text attachment that can be opened in an editor.
Most likely you are running into code blocks by indentation.
https://markdown-guide.readthedocs.io/en/latest/basics.html#code-block
Adding example file as a text attachment...
I've patched what I think was causing the issue; namely, code fences between multiple backticks could begin anywhere [1], but could only terminate at margins or inline because preceding whitespace was disallowed:
I've removed the whitespace check.
Note that a third consecutive backtick is not significant; everything after the second backtick will be styled as
SCE_MARKDOWN_CODE2
regardless.Because only two backticks are needed to mark the end, the final token wasn't being styled like the rest:
This has also been fixed.
There was another problem with the rules for
SCE_MARKDOWN_CODE
. As with italics, an inline code cell should be completely delimited before it's styled:I've amended inline code styling as was done for italics:
[1]: As for code fences within triple tildes (
~~~
), the rules are already consistent: the only place they can appear is at the margin, after a blank line.Committed changes in two parts: (1) only terminated code cells styles and (2) terminating code block when indented.
https://github.com/ScintillaOrg/lexilla/commit/78c09310c52cfc6659c006d3f6650f252d4a3955
https://github.com/ScintillaOrg/lexilla/commit/c88a51dfd00146b0f3facd8cc27027ef89d11b64
Added test cases for a non-terminated code cell and a plain backticks code block to check that all three closing backticks are styled.
There seems to be a wide variety of interpretations of Markdown (for example, https://github.github.com/gfm/#fenced-code-blocks) and there are different degrees of leniency/strictness that may be wanted from the lexer: maximum leniency to display diverse examples as intended and maximum strictness to prevent authors writing non-portable Markdown.