aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Tests/Readers/Markdown.hs10
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs3
2 files changed, 12 insertions, 1 deletions
diff --git a/src/Tests/Readers/Markdown.hs b/src/Tests/Readers/Markdown.hs
index 722a45bdb..021ef7fa5 100644
--- a/src/Tests/Readers/Markdown.hs
+++ b/src/Tests/Readers/Markdown.hs
@@ -26,4 +26,14 @@ tests = [ testGroup "inline code"
"`*` {.haskell .special x=\"7\"}"
=?> para (codeWith ("",["haskell","special"],[("x","7")]) "*")
]
+ , testGroup "footnotes"
+ [ "indent followed by newline" =: [_LIT|
+[^1]
+
+[^1]: my note
+
+
+not in note
+|] =?> para (note (para "my note")) +++ para "not in note"
+ ]
]
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index 58d2158bf..6a9753987 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -263,7 +263,8 @@ noteBlock = try $ do
char ':'
optional blankline
optional indentSpaces
- raw <- sepBy rawLines (try (blankline >> indentSpaces))
+ raw <- sepBy rawLines (try (blankline >> indentSpaces >>
+ notFollowedBy newline))
optional blanklines
endPos <- getPosition
let newnote = (ref, (intercalate "\n" raw) ++ "\n\n")