diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2017-10-08 14:17:26 +0200 |
---|---|---|
committer | Albert Krewinkel <albert@zeitkraut.de> | 2017-10-08 14:17:26 +0200 |
commit | f176ad6f21aa02884f628082c05eecb76816d014 (patch) | |
tree | 6cad8512dd4aeeaa715f3396332b7f239e1a60a1 /src/Text/Pandoc | |
parent | 89f136266037ae1f25277a50c1fab42c28a92c47 (diff) | |
download | pandoc-f176ad6f21aa02884f628082c05eecb76816d014.tar.gz |
Org reader: end footnotes after two blank lines
Footnotes can not only be terminated by the start of a new footnote or a
header, but also by two consecutive blank lines.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/Org/Blocks.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/Org/Blocks.hs b/src/Text/Pandoc/Readers/Org/Blocks.hs index 3e0ab0127..7f10195fe 100644 --- a/src/Text/Pandoc/Readers/Org/Blocks.hs +++ b/src/Text/Pandoc/Readers/Org/Blocks.hs @@ -724,13 +724,14 @@ latexEnd envName = try $ noteBlock :: PandocMonad m => OrgParser m (F Blocks) noteBlock = try $ do ref <- noteMarker <* skipSpaces <* updateLastPreCharPos - content <- mconcat <$> blocksTillHeaderOrNote + content <- mconcat <$> many1Till block endOfFootnote addToNotesTable (ref, content) return mempty where - blocksTillHeaderOrNote = - many1Till block (eof <|> () <$ lookAhead noteMarker - <|> () <$ lookAhead headerStart) + endOfFootnote = eof + <|> () <$ lookAhead noteMarker + <|> () <$ lookAhead headerStart + <|> () <$ lookAhead (try $ blankline *> blankline) -- Paragraphs or Plain text paraOrPlain :: PandocMonad m => OrgParser m (F Blocks) |