diff options
| -rw-r--r-- | src/Text/Pandoc/Readers/Muse.hs | 2 | ||||
| -rw-r--r-- | test/Tests/Readers/Muse.hs | 9 | 
2 files changed, 10 insertions, 1 deletions
| diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs index f21a169fd..fe6b3698c 100644 --- a/src/Text/Pandoc/Readers/Muse.hs +++ b/src/Text/Pandoc/Readers/Muse.hs @@ -821,7 +821,7 @@ footnote = try $ do        Nothing -> return $ B.str $ "[" ++ ref ++ "]"        Just (_pos, contents) -> do          st <- askF -        let contents' = runF contents st { museNotes = M.empty } +        let contents' = runF contents st { museNotes = M.delete ref (museNotes st) }          return $ B.note contents'  whitespace :: PandocMonad m => MuseParser m (F Inlines) diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs index a7eb9d0eb..ecdd5fdb0 100644 --- a/test/Tests/Readers/Muse.hs +++ b/test/Tests/Readers/Muse.hs @@ -659,6 +659,15 @@ tests =                      ] =?>            para (text "Start recursion here" <>                  note (para "Recursion continues here[1]")) +        , "Nested footnotes" =: +          T.unlines [ "Footnote: [1]" +                    , "" +                    , "[1] Nested: [2]" +                    , "" +                    , "[2] No recursion: [1]" +                    ] =?> +          para (text "Footnote: " <> +                note (para (text "Nested: " <> note (para $ text "No recursion: [1]"))))          , "No zero footnotes" =:            T.unlines [ "Here is a footnote[0]."                      , "" | 
