diff options
| author | Johannes Altmanninger <aclopte@gmail.com> | 2020-10-26 18:41:10 +0100 |
|---|---|---|
| committer | Johannes Altmanninger <aclopte@gmail.com> | 2021-02-10 21:09:16 +0100 |
| commit | cfae4dda91ae7e7c1b9ac0464148becb9a39529f (patch) | |
| tree | 3d6a09d6d9c7131b414dd7dc1a430476c6dbc0f2 | |
| parent | 26cf5cd1dce362a34593fcf5994c961f8aa53bc0 (diff) | |
rc restructuredtext: don't highlight first character of next line as code
Reproduce by creating a *.rst buffer with the text below. The "N" used to
be highlighted as code.
::
code
Not code
| -rw-r--r-- | rc/filetype/restructuredtext.kak | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rc/filetype/restructuredtext.kak b/rc/filetype/restructuredtext.kak index e7a86fcc..434525a5 100644 --- a/rc/filetype/restructuredtext.kak +++ b/rc/filetype/restructuredtext.kak @@ -24,7 +24,7 @@ provide-module restructuredtext %{ add-highlighter shared/restructuredtext regions add-highlighter shared/restructuredtext/content default-region group -add-highlighter shared/restructuredtext/code region ::\h*\n ^[^\s] fill meta +add-highlighter shared/restructuredtext/code region ::\h*\n ^(?=\S) fill meta evaluate-commands %sh{ for ft in c cabal clojure coffee cpp css cucumber ddiff dockerfile \ @@ -33,7 +33,7 @@ evaluate-commands %sh{ perl pug python ragel ruby rust sass scala scss sh swift \ tupfile yaml; do if [ "$ft" = kak ]; then ref="kakrc"; else ref="$ft"; fi - printf 'add-highlighter shared/restructuredtext/%s region %s %s ref %s\n' "$ft" '\.\.\h*'$ft'::\h*c\h*\n' '^\S' "$ref" + printf 'add-highlighter shared/restructuredtext/%s region %s %s ref %s\n' "$ft" '\.\.\h*'$ft'::\h*c\h*\n' '^(?=\S)' "$ref" done } |
