aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs5
-rw-r--r--test/Tests/Readers/Muse.hs17
2 files changed, 20 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs
index 9b48c70aa..bc3bb921e 100644
--- a/src/Text/Pandoc/Readers/Muse.hs
+++ b/src/Text/Pandoc/Readers/Muse.hs
@@ -492,9 +492,10 @@ amuseNoteBlockUntil :: PandocMonad m
-> MuseParser m (F Blocks, a)
amuseNoteBlockUntil end = try $ do
guardEnabled Ext_amuse
- ref <- noteMarker <* spaceChar
+ ref <- noteMarker
pos <- getPosition
- (content, e) <- allowPara $ listItemContentsUntil (sourceColumn pos - 1) (fail "x") end
+ void spaceChar <|> lookAhead eol
+ (content, e) <- allowPara $ listItemContentsUntil (sourceColumn pos) (fail "x") end
addNote ref pos content
return (mempty, e)
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs
index ab0579519..36724b33c 100644
--- a/test/Tests/Readers/Muse.hs
+++ b/test/Tests/Readers/Muse.hs
@@ -797,6 +797,23 @@ tests =
, "baz"
] =?>
para (str "Foo" <> note (lineBlock ["bar"])) <> para (str "baz")
+
+ , "Footnote starting with empty line" =:
+ T.unlines [ "Foo[1]"
+ , ""
+ , "[1]" -- No space character after note marker
+ , ""
+ , " Bar"
+ ] =?>
+ para (str "Foo" <> note (para $ text "Bar"))
+ , "Indentation in footnote starting with empty line" =:
+ T.unlines [ "Foo[1]"
+ , ""
+ , "[1]" -- No space character after note marker
+ , ""
+ , " Bar"
+ ] =?>
+ para (str "Foo" <> note mempty) <> blockQuote (para $ text "Bar")
, test emacsMuse "Emacs multiparagraph footnotes"
(T.unlines
[ "First footnote reference[1] and second footnote reference[2]."