aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs4
-rw-r--r--test/Tests/Readers/Muse.hs8
2 files changed, 10 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs
index 794ca7385..f10a2172f 100644
--- a/src/Text/Pandoc/Readers/Muse.hs
+++ b/src/Text/Pandoc/Readers/Muse.hs
@@ -318,8 +318,8 @@ amuseNoteBlock :: PandocMonad m => MuseParser m (F Blocks)
amuseNoteBlock = try $ do
guardEnabled Ext_amuse
pos <- getPosition
- ref <- noteMarker <* skipSpaces
- content <- listItemContents $ 2 + length ref
+ ref <- noteMarker <* spaceChar
+ content <- listItemContents $ 3 + length ref
oldnotes <- stateNotes' <$> getState
case M.lookup ref oldnotes of
Just _ -> logMessage $ DuplicateNoteReference ref pos
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs
index 0cccb50e6..c0da48586 100644
--- a/test/Tests/Readers/Muse.hs
+++ b/test/Tests/Readers/Muse.hs
@@ -385,6 +385,14 @@ tests =
, " </example>"
] =?>
definitionList [ ("term", [codeBlock "foo" <> para "bar" <> codeBlock "baz"]) ]
+ , "Example inside note" =:
+ T.unlines [ "Foo[1]"
+ , ""
+ , "[1] <example>"
+ , " bar"
+ , " </example>"
+ ] =?>
+ para ("Foo" <> note (codeBlock "bar"))
]
, testGroup "Literal blocks"
[ test emacsMuse "Literal block"