From 7864f30717767f89ee33532b59819b51ef2e14d4 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 6 Dec 2010 20:36:58 -0800 Subject: Markdown reader: handle curly quotes better. Previously, curly quotes were just parsed literally, leading to problems in some output formats. Now they are parsed as Quoted inlines, if --smart is specified. Resolves Issue #270. --- tests/RunTests.hs | 2 +- tests/markdown-reader-more.native | 5 ++++- tests/markdown-reader-more.txt | 6 ++++++ 3 files changed, 11 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/RunTests.hs b/tests/RunTests.hs index 94b56d04d..0d8a1a6a1 100644 --- a/tests/RunTests.hs +++ b/tests/RunTests.hs @@ -96,7 +96,7 @@ main = do "testsuite.txt" "testsuite.native" r7 <- runTest "markdown reader (tables)" ["-r", "markdown", "-w", "native"] "tables.txt" "tables.native" - r7a <- runTest "markdown reader (more)" ["-r", "markdown", "-w", "native"] + r7a <- runTest "markdown reader (more)" ["-r", "markdown", "-w", "native", "-S"] "markdown-reader-more.txt" "markdown-reader-more.native" r8 <- runTest "rst reader" ["-r", "rst", "-w", "native", "-s", "-S"] "rst-reader.rst" "rst-reader.native" diff --git a/tests/markdown-reader-more.native b/tests/markdown-reader-more.native index 55968af32..784b14ccc 100644 --- a/tests/markdown-reader-more.native +++ b/tests/markdown-reader-more.native @@ -45,4 +45,7 @@ Pandoc (Meta {docTitle = [Str "Title",Space,Str "spanning",Space,Str "multiple", , Header 2 [Str "Case",Str "-",Str "insensitive",Space,Str "references"] , Para [Link [Str "Fum"] ("/fum","")] , Para [Link [Str "FUM"] ("/fum","")] -, Para [Link [Str "bat"] ("/bat","")] ] +, Para [Link [Str "bat"] ("/bat","")] +, Header 2 [Str "Curly",Space,Str "smart",Space,Str "quotes"] +, Para [Quoted DoubleQuote [Str "Hi"]] +, Para [Quoted SingleQuote [Str "Hi"]] ] diff --git a/tests/markdown-reader-more.txt b/tests/markdown-reader-more.txt index dd43a5df3..f4540d84d 100644 --- a/tests/markdown-reader-more.txt +++ b/tests/markdown-reader-more.txt @@ -116,3 +116,9 @@ $\tuple{x,y}$ [fum]: /fum [BAT]: /bat + +## Curly smart quotes + +“Hi” + +‘Hi’ -- cgit v1.2.3