aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Readers
diff options
context:
space:
mode:
authordanse <f.occhipinti@gmail.com>2018-04-23 08:54:06 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2018-07-24 15:35:50 -0700
commitbe2d7921cbf33a3aa839cd54a0b3ec0a7dfc4a9b (patch)
treede2767c8f0d18f638928181e02c41c7e0f4168cb /test/Tests/Readers
parent50e8c3b107c56d5de4840f369a2e49e4f55cd591 (diff)
downloadpandoc-be2d7921cbf33a3aa839cd54a0b3ec0a7dfc4a9b.tar.gz
RST reader: remove support for nested inlines.
RST does not allow nested emphasis, links, or other inline constructs. Closes #4581, double parsing of links with URLs as link text. This supersedes the earlier fix for #4581 in 6419819b46c0d69c7024ba8aa4a6381cb311341c. Fixes #4561, a bug parsing with URLs inside emphasis. Closes #4792.
Diffstat (limited to 'test/Tests/Readers')
-rw-r--r--test/Tests/Readers/RST.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Tests/Readers/RST.hs b/test/Tests/Readers/RST.hs
index 906ed4ff9..540c5d45a 100644
--- a/test/Tests/Readers/RST.hs
+++ b/test/Tests/Readers/RST.hs
@@ -188,4 +188,15 @@ tests = [ "line block with blank line" =:
] =?>
para ("foo" <> note (para "bar"))
]
+ , testGroup "inlines"
+ [ "links can contain an URI without being parsed twice (#4581)" =:
+ "`http://loc <http://loc>`__" =?>
+ para (link "http://loc" "" "http://loc")
+ , "inline markup cannot be nested" =:
+ "**a*b*c**" =?>
+ para (strong "a*b*c")
+ , "bare URI parsing disabled inside emphasis (#4561)" =:
+ "*http://location*" =?>
+ para (emph (text "http://location"))
+ ]
]