From 65cc909fdee4dbc93ba0cf1c04ff64780caae57e Mon Sep 17 00:00:00 2001 From: Francesco Occhipinti Date: Sun, 18 Mar 2018 03:21:27 +0100 Subject: RST writer: strip whitespace within inlines, closes #4327 (#4329) + Whitespace is ignored at the beginning and end of emphasis, as per . + Export `stripLeadingTrailingSpace` from `Text.Pandoc.Writers.Shared`. --- test/Tests/Writers/RST.hs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/Tests/Writers') 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") =?> -- cgit v1.2.3