RST reader: don't allow single-dash separator in headerless table.

Closes #4382.
This commit is contained in:
John MacFarlane 2018-10-07 12:37:08 -07:00
parent b806bff5b4
commit 145710c4c3
2 changed files with 13 additions and 1 deletions

View file

@ -1269,7 +1269,9 @@ simpleTableHeader headless = try $ do
rawContent <- if headless
then return ""
else simpleTableSep '=' >> anyLine
dashes <- simpleDashedLines '=' <|> simpleDashedLines '-'
dashes <- if headless
then simpleDashedLines '='
else simpleDashedLines '=' <|> simpleDashedLines '-'
newline
let lines' = map snd dashes
let indices = scanl (+) 0 lines'

10
test/command/4382.md Normal file
View file

@ -0,0 +1,10 @@
```
% pandoc -f rst -t native
-
=====
^D
[BulletList
[[]]
,HorizontalRule]
```