mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-21 05:43:39 +08:00
RST reader: don't allow single-dash separator in headerless table.
Closes #4382.
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
```
|
||||
% pandoc -f rst -t native
|
||||
-
|
||||
|
||||
=====
|
||||
^D
|
||||
[BulletList
|
||||
[[]]
|
||||
,HorizontalRule]
|
||||
```
|
||||
Reference in New Issue
Block a user