Markdown reader: don't parse footnote body unless extension enabled.

This commit is contained in:
John MacFarlane 2019-11-13 21:18:39 -08:00
parent cbcaf19174
commit 3982b23428

View file

@ -460,8 +460,9 @@ rawLines = do
return $ T.unlines (first:rest)
noteBlock :: PandocMonad m => MarkdownParser m (F Blocks)
noteBlock = try $ do
pos <- getPosition
noteBlock = do
guardEnabled Ext_footnotes
do pos <- getPosition
skipNonindentSpaces
ref <- noteMarker
char ':'
@ -476,7 +477,8 @@ noteBlock = try $ do
case M.lookup ref oldnotes of
Just _ -> logMessage $ DuplicateNoteReference ref pos
Nothing -> return ()
updateState $ \s -> s { stateNotes' = M.insert ref (pos, parsed) oldnotes }
updateState $ \s -> s { stateNotes' =
M.insert ref (pos, parsed) oldnotes }
return mempty
--