summaryrefslogtreecommitdiff
path: root/src/Tests
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-04-20 11:42:27 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2011-04-20 11:42:27 -0700
commitb42c48e91918388e6b8eaaba36f4521441128a00 (patch)
treeed5c86a7c12659562600d448d536da188b3f07ad /src/Tests
parent4f526fc5218ccb4a7b40c17adb2d85ba82a08d2f (diff)
Disallow notes within notes in reST and markdown.
These previously caused infinite looping and stack overflows. For example: [^1] [^1]: See [^1] Note references are allowed in reST notes, so this isn't a full implementation of reST. That can come later. For now we need to prevent the stack overflows. Partially resolves Issue #297.
Diffstat (limited to 'src/Tests')
-rw-r--r--src/Tests/Readers/Markdown.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Tests/Readers/Markdown.hs b/src/Tests/Readers/Markdown.hs
index 9f393ac96..d3687b38a 100644
--- a/src/Tests/Readers/Markdown.hs
+++ b/src/Tests/Readers/Markdown.hs
@@ -47,6 +47,9 @@ tests = [ testGroup "inline code"
, "indent followed by newline and indented text" =:
"[^1]\n\n[^1]: my note\n \n in note\n"
=?> para (note (para "my note" +++ para "in note"))
+ , "recursive note" =:
+ "[^1]\n\n[^1]: See [^1]\n"
+ =?> para (note (para "See [^1]"))
]
, testGroup "lhs"
[ test (readMarkdown defaultParserState{stateLiterateHaskell = True})