This highlighter (line 50 of markdown.kak) looks for the filetype
specified by the author at the top of the code fence, e.g.
``` python
print("hello")
```
and highlights the code within using Kakoune's relevant highlighter --
in this case Python.
Some flavours of markdown use curly braces and other characters in the
first line such as the following:
``` {=python}
print("hello")
```
Previously Kakoune recognised `{=python}` but not `{.python}`. The latter
is Pandoc's flavour of markdown. This patch adjusts the regex patterns
to recognise the dot notation as well.
This commit prevents the lines following the one that holds the bullet
from being highlighted with the `bullet` face when they're indented:
- The bullet is highlighted properly, so is this sentence
but this line the ones that would follow are not
Fixes#3582
This commit allows code blocks to be prefixed with tabulation
characters to be picked up and highlighted by the editor.
Indenting caused by the inclusion of an inline code block into a
list item is also taken into account. However, that might cause false
positives, for example with a hard wrapped list item indented with
an amount of spaces congruent to 4.
This commit addresses the following issues:
* highlight trailing space characters with the `meta` face, instead of
`PrimarySelection`
* make the regex more readable by using a capture group in stead of
`\K`
* specifically match space characters, not other horizontal whitespace
characters
* match two or more space characters
Reference[1]:
> When you do want to insert a <br /> break tag using Markdown, you
> end a line with two or more spaces, then type return.
[1] https://daringfireball.net/projects/markdown/syntax#p
Note that the original reproducer doesn't seem to work anymore,
probably because of changes made to how lists are highlighted.
Fixes#911
This commit removes declarations and mentions to the built-in `bold`
and `italic` faces.
While they could be a user-friendly way of customising how tokens
are emphasised in Markdown documents (similarly to the
`$LESS_TERMCAP_*` environment variables for `man` pagers), most other
markup languages do not have the concept of "strong" and "emphasis"
but refer directly to the font style/weight.
The faces were also not even set by default to highlight as their
names implied, so having markup language support scripts directly
use the +b and +i face attributes is more consistent.
This commit allows using the <semicolon> expansion in commands, instead
of `\;`.
It makes commands look more elegant, and prevents new-comers from
falling into the trap of using <a-;> without escaping the semicolon.