diff options
author | Francesco Occhipinti <focchi.pinti@gmail.com> | 2018-03-18 03:21:27 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-03-17 19:21:27 -0700 |
commit | 65cc909fdee4dbc93ba0cf1c04ff64780caae57e (patch) | |
tree | 8581700724f3588c90d57ae50d86080818ab687a /test | |
parent | 59903ec82c20d1a8390c06108004cce9bb6fa70d (diff) | |
download | pandoc-65cc909fdee4dbc93ba0cf1c04ff64780caae57e.tar.gz |
RST writer: strip whitespace within inlines, closes #4327 (#4329)
+ Whitespace is ignored at the beginning and end of emphasis, as per
<http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup>.
+ Export `stripLeadingTrailingSpace` from `Text.Pandoc.Writers.Shared`.
Diffstat (limited to 'test')
-rw-r--r-- | test/Tests/Writers/RST.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Tests/Writers/RST.hs b/test/Tests/Writers/RST.hs index 4c0a926bb..b8778f995 100644 --- a/test/Tests/Writers/RST.hs +++ b/test/Tests/Writers/RST.hs @@ -50,6 +50,15 @@ tests = [ testGroup "rubrics" , "" , " quoted"] ] + , testGroup "spaces are stripped within inlines" + -- pandoc issue 4327 "The text within inline markup may not + -- begin or end with whitespace" + -- http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup + [ "multiple" =: + strong (space <> str "text" <> space <> space) =?> "**text**" + , "single" =: + strong (space) =?> "****" + ] , testGroup "headings" [ "normal heading" =: header 1 (text "foo") =?> |