aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs4
-rw-r--r--test/Tests/Readers/Muse.hs11
2 files changed, 13 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs
index 2ddaffabd..70cd47b58 100644
--- a/src/Text/Pandoc/Readers/Muse.hs
+++ b/src/Text/Pandoc/Readers/Muse.hs
@@ -56,7 +56,7 @@ import Text.Pandoc.Error (PandocError (PandocParsecError))
import Text.Pandoc.Logging
import Text.Pandoc.Options
import Text.Pandoc.Parsing hiding (F)
-import Text.Pandoc.Shared (crFilter, underlineSpan)
+import Text.Pandoc.Shared (crFilter, trimr, underlineSpan)
-- | Read Muse from an input string and return a Pandoc document.
readMuse :: PandocMonad m
@@ -692,7 +692,7 @@ museGridTableRow :: PandocMonad m
-> MuseParser m (F [Blocks])
museGridTableRow indent indices = try $ do
lns <- many1 $ try (indentWith indent *> museGridTableRawLine indices)
- let cols = map unlines $ transpose lns
+ let cols = map (unlines . map trimr) $ transpose lns
indentWith indent *> museGridTableHeader
sequence <$> mapM (parseFromString parseBlocks) cols
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs
index 0f9f2d92f..26720d8c5 100644
--- a/test/Tests/Readers/Muse.hs
+++ b/test/Tests/Readers/Muse.hs
@@ -1019,6 +1019,17 @@ tests =
[[table mempty [(AlignDefault, 0.0)]
[]
[[para "foo"]]]]
+ , "Grid table with example" =:
+ T.unlines
+ [ "+------------+"
+ , "| <example> |"
+ , "| foo |"
+ , "| </example> |"
+ , "+------------+"
+ ] =?>
+ table mempty [(AlignDefault, 0.0)]
+ []
+ [[codeBlock "foo"]]
]
, testGroup "Lists"
[ "Bullet list" =: