Muse reader: allow table caption to contain "+"
This commit is contained in:
parent
537d917988
commit
5f7799ac8f
2 changed files with 9 additions and 1 deletions
|
@ -749,7 +749,7 @@ tableParseCaption :: PandocMonad m => MuseParser m (F MuseTableElement)
|
|||
tableParseCaption = try $ fmap MuseCaption . trimInlinesF . mconcat
|
||||
<$ many spaceChar
|
||||
<* string "|+"
|
||||
<*> many1Till inline (string "+|")
|
||||
<*> many1Till inline (try $ string "+|")
|
||||
|
||||
-- ** Inline parsers
|
||||
|
||||
|
|
|
@ -857,6 +857,14 @@ tests =
|
|||
[plain "Foo", plain "bar", plain "baz"]
|
||||
[[plain "First", plain "row", plain "here"],
|
||||
[plain "Second", plain "row", plain "there"]]
|
||||
, "Table caption with +" =:
|
||||
T.unlines
|
||||
[ "Foo | bar"
|
||||
, "|+ Table + caption +|"
|
||||
] =?>
|
||||
table (text "Table + caption") (replicate 2 (AlignDefault, 0.0))
|
||||
[]
|
||||
[[plain "Foo", plain "bar"]]
|
||||
, "Caption without table" =:
|
||||
"|+ Foo bar baz +|" =?>
|
||||
table (text "Foo bar baz") [] [] []
|
||||
|
|
Loading…
Reference in a new issue