I’m using the Markdown lexer and seeing flaky rendering for tab-indented code blocks.
Take a look at this screen recording. As I type, the code block highlighting randomly drops out.
https://streamable.com/pv4t27
My questions:
Is this a lexer bug?
If not, the trigger rules for tab-indented code blocks are really confusing.
Tab-indented code block rendering issue
-
main Alexey
- Posts: 2708
- Joined: 25.08.2021 18:15
Re: Tab-indented code block rendering issue
it has the reason.
a. regex for 'codeblock' rule is
so you need empty line above code + empty line below.
b. coloring changes when edition touches 1st line of block.
a. regex for 'codeblock' rule is
Code: Select all
DisplayName = 'Codeblock indented'
Expression = '(?<=^$\n)(^(\x20{4,}|\x09{1,})[^`<>:\n\r].*$\n)+ ^$'b. coloring changes when edition touches 1st line of block.
Re: Tab-indented code block rendering issue
Thank you for the explanation, I finally understand.