diff options
| author | Tim Allen <screwtape@froup.com> | 2018-09-18 18:55:24 +1000 |
|---|---|---|
| committer | Tim Allen <screwtape@froup.com> | 2018-09-18 19:18:32 +1000 |
| commit | 535abe2ba725d00c0057d645e9bd268ec5380227 (patch) | |
| tree | 5231d9bb40d4f40c582c0d0b775b2405549f263b /src/input_handler.cc | |
| parent | af8dd681d58ab841ef773bb10af886b073bdaabf (diff) | |
markdown.kak: Clean up code-block and code-span formatting.
Previously, a code block was anything between triple-backtics, including inline
blocks:
some text ```
not a codeblock, but highlighted as one
``` other text
and even if the closing backticks had the wrong indent:
```
this is a code block containing a triple backtick
```
this is still a code block, but Kakoune thinks otherwise
```
Now we use the -match-capture flag to ensure the start and end fences have
exactly the same indent.
Previously, the generic code-block region was defined first, which meant that
it took priority over all the language-specific highlighters. Now we define
the generic code-block highlighting *after* the others, which fixes #2304.
Previously, code-spans were defined as ordinary inline markup, but in Markdown
ordinary formatting doesn't work inside code-spans. Therefore, they are now
regions unto themselves, defined according to section 6.3 of the CommonMark
spec <https://spec.commonmark.org/0.28/#code-spans>, which addresses a comment
on #2111.
Diffstat (limited to 'src/input_handler.cc')
0 files changed, 0 insertions, 0 deletions
