Allow spaces before '!' in MediaWiki table header

This commit is contained in:
roblabla 2016-05-09 15:22:02 +02:00
parent 21d1a3b57c
commit acd492c7f4
3 changed files with 14 additions and 1 deletions

View file

@ -225,7 +225,7 @@ table = do
Nothing -> 1.0
caption <- option mempty tableCaption
optional rowsep
hasheader <- option False $ True <$ (lookAhead (char '!'))
hasheader <- option False $ True <$ (lookAhead (skipSpaces *> char '!'))
(cellspecs',hdr) <- unzip <$> tableRow
let widths = map ((tableWidth *) . snd) cellspecs'
let restwidth = tableWidth - sum widths

View file

@ -252,6 +252,11 @@ Pandoc (Meta {unMeta = fromList []})
[[]]
[[[Para [Str "Orange"]]]]
,Para [Str "Paragraph",Space,Str "after",Space,Str "the",Space,Str "table."]
,Table [] [AlignDefault,AlignDefault] [0.0,0.0]
[[Para [Str "fruit"]]
,[Para [Str "topping"]]]
[[[Para [Str "apple"]]
,[Para [Str "ice",Space,Str "cream"]]]]
,Header 2 ("notes",[],[]) [Str "notes"]
,Para [Str "My",Space,Str "note!",Note [Plain [Str "This."]]]
,Para [Str "URL",Space,Str "note.",Note [Plain [Link ("",[],[]) [Str "http://docs.python.org/library/functions.html#range"] ("http://docs.python.org/library/functions.html#range","")]]]]

View file

@ -381,6 +381,14 @@ and cheese
|Orange
|}Paragraph after the table.
{|
!fruit
!topping
|-
|apple
|ice cream
|}
== notes ==
My note!<ref>This.</ref>