vim-markdown icon indicating copy to clipboard operation
vim-markdown copied to clipboard

Improve markdownRule syntax matching

Open psvenk opened this issue 4 years ago • 1 comments

  • markdownRule now only matches if a line contains 0-3 spaces followed by the characters forming the rule (e.g. ␣␣*␣*␣*␣*␣*), with nothing else on the line. This is in accordance with CommonMark (and compatible with the original spec, which does not allow whitespace before the characters forming the rule).
  • A horizontal rule can also be formed by underscores, in accordance with the original spec and CommonMark.
  • An italic, bold, or bold-italic region is no longer started if the delimiter is adjacent to a copy of itself (possibly with whitespace in between). For example, an italic or bold region delimited by asterisks would not begin if the beginning asterisk(s) is/are adjacent to another asterisk. This should not have any practical consequences (italic/bold regions consisting only of whitespace would not be matched), other than that horizontal rules made of asterisks or underscores will now be matched and highlighted properly.
Screenshot

Screenshot at 2020-06-04 11-46-06

psvenk avatar Jun 04 '20 15:06 psvenk

I apologize for the repeated notifications; I accidentally pushed another commit to this branch just now. This should now be fixed (I force-pushed HEAD^).

psvenk avatar Jul 07 '20 14:07 psvenk