doc.kak: Tweak paragraph joining logic

Fixes #2378
This commit is contained in:
Maxime Coste 2018-09-23 17:40:16 +10:00
parent 5d0ea2936d
commit bb1cb0dbf1

View File

@ -102,7 +102,7 @@ define-command -params 1 -hidden doc-render %{
doc-parse-anchors
# Join paragraphs together
try %{ execute-keys -draft \%S \n{2,}|(?<=\+)\n|^[^\n]+::\n|\n\h*[-*] <ret> <a-K>^-{2,}(\n|\z)<ret> S\n\z<ret> <a-k>\n<ret> <a-j> }
try %{ execute-keys -draft \%S \n{2,}|(?<=\+)\n|^[^\n]+::\n <ret> <a-K>^\h*-{2,}(\n|\z)<ret> S\n\z<ret> <a-k>\n<ret> <a-j> }
# Remove some line end markers
try %{ execute-keys -draft \%s \h*(\+|:{2,})$ <ret> d }