Commit 0e1f9af
committed
correct highlights of hrules and YAML headers
Highlight horizontal rules according to
http://johnmacfarlane.net/pandoc/README.html#horizontal-rules
(i.e. 3 possible symbols optionally delimited or surrounded by spaces).
Correctly distinguish hrules and YAML headers: the latter must begin
from line with exactly 3 dashes with non-blank line. This is not
clearly stated in pandoc docs but is as implemented in pandoc: see
source code of function yamlMetaBlock from
http://hackage.haskell.org/package/pandoc-1.13.2/docs/src/Text-Pandoc-Readers-Markdown.html,
here is an excerpt:
yamlMetaBlock = try $ do
guardEnabled Ext_yaml_metadata_block
pos <- getPosition
string "---"
blankline
notFollowedBy blankline -- if --- is followed by a blank it's an HRULE
This commit must also fix #1191 parent 1801845 commit 0e1f9af
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
448 | | - | |
| 448 | + | |
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
| |||
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
462 | | - | |
| 462 | + | |
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
| |||
0 commit comments