git.iko.soy/typeable/pandoc
on master help sign in
Muse reader: allow table caption to contain "+"
commit5f7799ac8f359fbb7896037a79f2abb61be2fd2c authorAlexander Krotov <ilabdsf@gmail.com> dateFri 5 Oct 2018, 11:58 (8 years ago) parent537d917
2 files changed+9−1
src/Text/Pandoc/Readers/Muse.hs+1−1 test/Tests/Readers/Muse.hs+8
src/Text/Pandoc/Readers/Muse.hs+1−1
@@ -749,7 +749,7 @@ tableParseCaption :: PandocMonad m => MuseParser m (F MuseTableElement)
749749tableParseCaption = try $ fmap MuseCaption . trimInlinesF . mconcat
750750 <$ many spaceChar
751751 <* string "|+"
752− <*> many1Till inline (string "+|")
752+ <*> many1Till inline (try $ string "+|")
753753
754754-- ** Inline parsers
755755
test/Tests/Readers/Muse.hs+8
@@ -857,6 +857,14 @@ tests =
857857 [plain "Foo", plain "bar", plain "baz"]
858858 [[plain "First", plain "row", plain "here"],
859859 [plain "Second", plain "row", plain "there"]]
860+ , "Table caption with +" =:
861+ T.unlines
862+ [ "Foo | bar"
863+ , "|+ Table + caption +|"
864+ ] =?>
865+ table (text "Table + caption") (replicate 2 (AlignDefault, 0.0))
866+ []
867+ [[plain "Foo", plain "bar"]]
860868 , "Caption without table" =:
861869 "|+ Foo bar baz +|" =?>
862870 table (text "Foo bar baz") [] [] []