git.iko.soy/typeable/pandoc
on master help sign in
Muse writer: set envInsideBlock = True when rendering notes
commit1aac754359d44a96e30e96f61f38c58d6aea29b4 authorAlexander Krotov <ilabdsf@gmail.com> dateTue 11 Sep 2018, 14:10 (8 years ago) parente6ba0cc
2 files changed+9−1
src/Text/Pandoc/Writers/Muse.hs+2−1 test/Tests/Writers/Muse.hs+7
src/Text/Pandoc/Writers/Muse.hs+2−1
@@ -293,7 +293,8 @@ noteToMuse :: PandocMonad m
293293 -> Muse m Doc
294294noteToMuse num note =
295295 hang (length marker) (text marker) <$>
296− (local (\env -> env { envInlineStart = True
296+ (local (\env -> env { envInsideBlock = True
297+ , envInlineStart = True
297298 , envAfterSpace = True
298299 }) $ blockListToMuse note)
299300 where
test/Tests/Writers/Muse.hs+7
@@ -363,6 +363,13 @@ tests = [ testGroup "block elements"
363363 , ""
364364 , "[1] <verbatim></verbatim>- foo"
365365 ]
366+ , "escape - after softbreak in note" =:
367+ note (para (str "foo" <> softbreak <> str "- bar")) =?>
368+ unlines [ "[1]"
369+ , ""
370+ , "[1] foo"
371+ , " <verbatim></verbatim>- bar"
372+ ]
366373 , "escape ; to avoid accidental comments" =: text "; foo" =?> "<verbatim></verbatim>; foo"
367374 , "escape strings starting with ; and space" =: str "; foo" =?> "<verbatim></verbatim>; foo"
368375 , "escape ; after softbreak" =: text "foo" <> softbreak <> text "; bar" =?> "foo\n<verbatim></verbatim>; bar"