aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Writers/Muse.hs3
-rw-r--r--test/Tests/Writers/Muse.hs7
2 files changed, 9 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Muse.hs b/src/Text/Pandoc/Writers/Muse.hs
index 26349493b..13c9c23b7 100644
--- a/src/Text/Pandoc/Writers/Muse.hs
+++ b/src/Text/Pandoc/Writers/Muse.hs
@@ -293,7 +293,8 @@ noteToMuse :: PandocMonad m
-> Muse m Doc
noteToMuse num note =
hang (length marker) (text marker) <$>
- (local (\env -> env { envInlineStart = True
+ (local (\env -> env { envInsideBlock = True
+ , envInlineStart = True
, envAfterSpace = True
}) $ blockListToMuse note)
where
diff --git a/test/Tests/Writers/Muse.hs b/test/Tests/Writers/Muse.hs
index 4cb7618f3..614e9dbc6 100644
--- a/test/Tests/Writers/Muse.hs
+++ b/test/Tests/Writers/Muse.hs
@@ -363,6 +363,13 @@ tests = [ testGroup "block elements"
, ""
, "[1] <verbatim></verbatim>- foo"
]
+ , "escape - after softbreak in note" =:
+ note (para (str "foo" <> softbreak <> str "- bar")) =?>
+ unlines [ "[1]"
+ , ""
+ , "[1] foo"
+ , " <verbatim></verbatim>- bar"
+ ]
, "escape ; to avoid accidental comments" =: text "; foo" =?> "<verbatim></verbatim>; foo"
, "escape strings starting with ; and space" =: str "; foo" =?> "<verbatim></verbatim>; foo"
, "escape ; after softbreak" =: text "foo" <> softbreak <> text "; bar" =?> "foo\n<verbatim></verbatim>; bar"