mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-24 15:44:59 +08:00
Muse reader: fix indentation requirements for footnote continuations
This commit is contained in:
@@ -470,10 +470,10 @@ amuseNoteBlockUntil :: PandocMonad m
|
||||
-> MuseParser m (F Blocks, a)
|
||||
amuseNoteBlockUntil end = try $ do
|
||||
guardEnabled Ext_amuse
|
||||
pos <- getPosition
|
||||
ref <- noteMarker <* spaceChar
|
||||
pos <- getPosition
|
||||
updateState (\st -> st { museInPara = False })
|
||||
(content, e) <- listItemContentsUntil (sourceColumn pos) (fail "x") end
|
||||
(content, e) <- listItemContentsUntil (sourceColumn pos - 1) (fail "x") end
|
||||
oldnotes <- museNotes <$> getState
|
||||
case M.lookup ref oldnotes of
|
||||
Just _ -> logMessage $ DuplicateNoteReference ref pos
|
||||
|
||||
@@ -637,6 +637,16 @@ tests =
|
||||
text " footnotes" <>
|
||||
note (para "Second footnote")) <>
|
||||
para (text "Not a note")
|
||||
|
||||
-- Verse requires precise indentation, so it is good to test indentation requirements
|
||||
, "Note continuation with verse" =:
|
||||
T.unlines [ "Foo[1]"
|
||||
, ""
|
||||
, "[1] Bar"
|
||||
, ""
|
||||
, " > Baz"
|
||||
] =?>
|
||||
para ("Foo" <> note (para "Bar" <> lineBlock ["Baz"]))
|
||||
, test emacsMuse "Emacs multiparagraph footnotes"
|
||||
(T.unlines
|
||||
[ "First footnote reference[1] and second footnote reference[2]."
|
||||
|
||||
Reference in New Issue
Block a user