From d045ad4db0ff826c92c4f51f3bac6cd07d8e08af Mon Sep 17 00:00:00 2001 From: Rane Brown Date: Thu, 23 May 2019 21:59:13 -0600 Subject: [PATCH] Modify horizontal rule (thematic-breaks) syntax for markdown. This change makes the horizontal rule syntax more closely match the commonmark spec https://spec.commonmark.org/0.29/#thematic-breaks. The number of characters required was changed to 3 and '___' and '***' where added as valid sequences. The space rules were not added becuase it adds extra complexity for little benefit. Issue #664. --- doc/vimwiki.txt | 1 + syntax/vimwiki_markdown.vim | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/vimwiki.txt b/doc/vimwiki.txt index ed45942..f9b4367 100644 --- a/doc/vimwiki.txt +++ b/doc/vimwiki.txt @@ -3517,6 +3517,7 @@ Removed:~ point. Fixed:~ + * Modify horizontal rule (thematic-breaks) syntax for markdown. * Disable spell check in code and math inline/blocks. * Properly handle markdown image links `![]()` * Issue #415: Expand iabbrev entries on . diff --git a/syntax/vimwiki_markdown.vim b/syntax/vimwiki_markdown.vim index 05e1f34..e68661a 100644 --- a/syntax/vimwiki_markdown.vim +++ b/syntax/vimwiki_markdown.vim @@ -67,7 +67,7 @@ let s:markdown_syntax.symH = 0 "
, horizontal rule -let s:markdown_syntax.rxHR = '^-----*$' +let s:markdown_syntax.rxHR = '\(^---*$\|^___*$\|^\*\*\**$\)' " Tables. Each line starts and ends with '|'; each cell is separated by '|' let s:markdown_syntax.rxTableSep = '|'