git.iko.soy/typeable/pandoc
on master help sign in
Replaced Apostrophe, Ellipses, EmDash, EnDash w/ unicode strings.
commita579e2c89289b97fa4083c2c0e2299da9d44e9e0 authorJohn MacFarlane <fiddlosopher@gmail.com> dateTue 27 Dec 2011, 15:45 (15 years ago) parent8838f47
29 files changed+231−277
src/Tests/Arbitrary.hs−4 src/Tests/Readers/LaTeX.hs+4−4 src/Tests/Readers/Markdown.hs+1−1 src/Text/Pandoc/Parsing.hs+6−6 src/Text/Pandoc/Readers/LaTeX.hs+3−3 src/Text/Pandoc/Readers/Markdown.hs+6−8 src/Text/Pandoc/Shared.hs−4 src/Text/Pandoc/Writers/AsciiDoc.hs−4 src/Text/Pandoc/Writers/ConTeXt.hs+4−4 src/Text/Pandoc/Writers/Docbook.hs−4 src/Text/Pandoc/Writers/HTML.hs−4 src/Text/Pandoc/Writers/LaTeX.hs+5−8 src/Text/Pandoc/Writers/Man.hs+7−5 src/Text/Pandoc/Writers/Markdown.hs−4 src/Text/Pandoc/Writers/MediaWiki.hs+2−10 src/Text/Pandoc/Writers/OpenDocument.hs+2−6 src/Text/Pandoc/Writers/Org.hs+6−5 src/Text/Pandoc/Writers/RST.hs−4 src/Text/Pandoc/Writers/RTF.hs+9−5 src/Text/Pandoc/Writers/Texinfo.hs+4−4 src/Text/Pandoc/Writers/Textile.hs+13−17 tests/latex-reader.native+21−21 tests/rst-reader.native+12−12 tests/testsuite.native+20−20 tests/textile-reader.native+8−8 tests/writer.docbook+17−17 tests/writer.mediawiki+26−26 tests/writer.native+20−20 tests/writer.opendocument+35−39
src/Tests/Arbitrary.hs−4
@@ -41,10 +41,6 @@ arbInline :: Int -> Gen Inline
4141arbInline n = frequency $ [ (60, liftM Str realString)
4242 , (60, return Space)
4343 , (10, liftM2 Code arbAttr realString)
44− , (5, return EmDash)
45− , (5, return EnDash)
46− , (5, return Apostrophe)
47− , (5, return Ellipses)
4844 , (5, elements [ RawInline "html" "<a id=\"eek\">"
4945 , RawInline "latex" "\\my{command}" ])
5046 ] ++ [ x | x <- nesters, n > 1]
src/Tests/Readers/LaTeX.hs+4−4
@@ -87,7 +87,7 @@ natbibCitations = testGroup "natbib"
8787 , "group" =: "\\citetext{\\citealp[see][p.~34--35]{item1}; \\citealp[also][chap. 3]{item3}}"
8888 =?> para (cite [baseCitation{ citationMode = NormalCitation
8989 , citationPrefix = [Str "see"]
90− , citationSuffix = [Str "p.\160\&34",EnDash,Str "35"] }
90+ , citationSuffix = [Str "p.\160\&34",Str "-",Str "35"] }
9191 ,baseCitation{ citationMode = NormalCitation
9292 , citationId = "item3"
9393 , citationPrefix = [Str "also"]
@@ -95,7 +95,7 @@ natbibCitations = testGroup "natbib"
9595 ] mempty)
9696 , "suffix and locator" =: "\\citep[pp.~33, 35--37, and nowhere else]{item1}"
9797 =?> para (cite [baseCitation{ citationMode = NormalCitation
98− , citationSuffix = [Str "pp.\160\&33,",Space,Str "35",EnDash,Str "37,",Space,Str "and",Space,Str "nowhere",Space, Str "else"] }] mempty)
98+ , citationSuffix = [Str "pp.\160\&33,",Space,Str "35",Str "-",Str "37,",Space,Str "and",Space,Str "nowhere",Space, Str "else"] }] mempty)
9999 , "suffix only" =: "\\citep[and nowhere else]{item1}"
100100 =?> para (cite [baseCitation{ citationMode = NormalCitation
101101 , citationSuffix = toList $ text "and nowhere else" }] mempty)
@@ -134,7 +134,7 @@ biblatexCitations = testGroup "biblatex"
134134 , "group" =: "\\autocites[see][p.~34--35]{item1}[also][chap. 3]{item3}"
135135 =?> para (cite [baseCitation{ citationMode = NormalCitation
136136 , citationPrefix = [Str "see"]
137− , citationSuffix = [Str "p.\160\&34",EnDash,Str "35"] }
137+ , citationSuffix = [Str "p.\160\&34",Str "-",Str "35"] }
138138 ,baseCitation{ citationMode = NormalCitation
139139 , citationId = "item3"
140140 , citationPrefix = [Str "also"]
@@ -142,7 +142,7 @@ biblatexCitations = testGroup "biblatex"
142142 ] mempty)
143143 , "suffix and locator" =: "\\autocite[pp.~33, 35--37, and nowhere else]{item1}"
144144 =?> para (cite [baseCitation{ citationMode = NormalCitation
145− , citationSuffix = [Str "pp.\160\&33,",Space,Str "35",EnDash,Str "37,",Space,Str "and",Space,Str "nowhere",Space, Str "else"] }] mempty)
145+ , citationSuffix = [Str "pp.\160\&33,",Space,Str "35",Str "-",Str "37,",Space,Str "and",Space,Str "nowhere",Space, Str "else"] }] mempty)
146146 , "suffix only" =: "\\autocite[and nowhere else]{item1}"
147147 =?> para (cite [baseCitation{ citationMode = NormalCitation
148148 , citationSuffix = toList $ text "and nowhere else" }] mempty)
src/Tests/Readers/Markdown.hs+1−1
@@ -60,7 +60,7 @@ tests = [ testGroup "inline code"
6060 , testGroup "smart punctuation"
6161 [ test markdownSmart "quote before ellipses"
6262 ("'...hi'"
63− =?> para (singleQuoted (singleton Ellipses <> "hi")))
63+ =?> para (singleQuoted ("…hi")))
6464 , test markdownSmart "apostrophe before emph"
6565 ("D'oh! A l'*aide*!"
6666 =?> para ("D’oh! A l’" <> emph "aide" <> "!"))
src/Text/Pandoc/Parsing.hs+6−6
@@ -779,22 +779,22 @@ doubleQuoteEnd = do
779779
780780ellipses :: GenParser Char st Inline
781781ellipses = do
782− try (charOrRef "…\133") <|> try (string "..." >> return '…')
783− return Ellipses
782+ try (charOrRef "\8230\133") <|> try (string "..." >> return '…')
783+ return (Str "\8230")
784784
785785dash :: GenParser Char st Inline
786786dash = enDash <|> emDash
787787
788788enDash :: GenParser Char st Inline
789789enDash = do
790− try (charOrRef "–\150") <|>
790+ try (charOrRef "\8211\150") <|>
791791 try (char '-' >> lookAhead (satisfy isDigit) >> return '–')
792− return EnDash
792+ return (Str "\8211")
793793
794794emDash :: GenParser Char st Inline
795795emDash = do
796− try (charOrRef "—\151") <|> (try $ string "--" >> optional (char '-') >> return '—')
797− return EmDash
796+ try (charOrRef "\8212\151") <|> (try $ string "--" >> optional (char '-') >> return '-')
797+ return (Str "\8212")
798798
799799--
800800-- Macros
src/Text/Pandoc/Readers/LaTeX.hs+3−3
@@ -802,13 +802,13 @@ ellipses = try $ do
802802 optional $ char 'l'
803803 string "dots"
804804 optional $ try $ string "{}"
805− return Ellipses
805+ return (Str "…")
806806
807807enDash :: GenParser Char st Inline
808−enDash = try (string "--") >> return EnDash
808+enDash = try (string "--") >> return (Str "-")
809809
810810emDash :: GenParser Char st Inline
811−emDash = try (string "---") >> return EmDash
811+emDash = try (string "---") >> return (Str "—")
812812
813813hyphen :: GenParser Char st Inline
814814hyphen = char '-' >> return (Str "-")
src/Text/Pandoc/Readers/Markdown.hs+6−8
@@ -1087,20 +1087,18 @@ nonEndline = satisfy (/='\n')
10871087
10881088str :: GenParser Char ParserState Inline
10891089str = do
1090− st <- getState
1090+ smart <- stateSmart `fmap` getState
10911091 a <- alphaNum
10921092 as <- many $ alphaNum
10931093 <|> (try $ char '_' >>~ lookAhead alphaNum)
1094− <|> if stateStrict st
1095− then mzero
1096− else (try $ satisfy (\c -> c == '\'' || c == '\x2019') >>
1094+ <|> if smart
1095+ then (try $ satisfy (\c -> c == '\'' || c == '\x2019') >>
10971096 lookAhead alphaNum >> return '\x2019')
1098− -- for things like l'aide - would be better to return
1099− -- an Apostrophe, but we can't in this context
1097+ -- for things like l'aide
1098+ else mzero
11001099 let result = a:as
1101− state <- getState
11021100 let spacesToNbr = map (\c -> if c == ' ' then '\160' else c)
1103− if stateSmart state
1101+ if smart
11041102 then case likelyAbbrev result of
11051103 [] -> return $ Str result
11061104 xs -> choice (map (\x ->
src/Text/Pandoc/Shared.hs−4
@@ -325,10 +325,6 @@ stringify = queryWith go
325325 go (Str x) = x
326326 go (Code _ x) = x
327327 go (Math _ x) = x
328− go EmDash = "--"
329− go EnDash = "-"
330− go Apostrophe = "'"
331− go Ellipses = "..."
332328 go LineBreak = " "
333329 go _ = ""
334330
src/Text/Pandoc/Writers/AsciiDoc.hs−4
@@ -321,10 +321,6 @@ inlineToAsciiDoc opts (Quoted SingleQuote lst) = do
321321inlineToAsciiDoc opts (Quoted DoubleQuote lst) = do
322322 contents <- inlineListToAsciiDoc opts lst
323323 return $ "``" <> contents <> "''"
324−inlineToAsciiDoc _ EmDash = return "\8212"
325−inlineToAsciiDoc _ EnDash = return "\8211"
326−inlineToAsciiDoc _ Apostrophe = return "\8217"
327−inlineToAsciiDoc _ Ellipses = return "\8230"
328324inlineToAsciiDoc _ (Code _ str) = return $
329325 text "`" <> text (escapeStringUsing (backslashEscapes "`") str) <> "`"
330326inlineToAsciiDoc _ (Str str) = return $ text $ escapeString str
src/Text/Pandoc/Writers/ConTeXt.hs+4−4
@@ -102,6 +102,10 @@ escapeCharForConTeXt ch =
102102 ']' -> "{]}"
103103 '_' -> "\\letterunderscore{}"
104104 '\160' -> "~"
105+ '\x2014' -> "---"
106+ '\x2013' -> "--"
107+ '\x2019' -> "'"
108+ '\x2026' -> "\\ldots{}"
105109 x -> [x]
106110
107111-- | Escape string for ConTeXt
@@ -258,10 +262,6 @@ inlineToConTeXt (Quoted DoubleQuote lst) = do
258262 contents <- inlineListToConTeXt lst
259263 return $ "\\quotation" <> braces contents
260264inlineToConTeXt (Cite _ lst) = inlineListToConTeXt lst
261−inlineToConTeXt Apostrophe = return $ char '\''
262−inlineToConTeXt EmDash = return "---"
263−inlineToConTeXt EnDash = return "--"
264−inlineToConTeXt Ellipses = return "\\ldots{}"
265265inlineToConTeXt (Str str) = return $ text $ stringToConTeXt str
266266inlineToConTeXt (Math InlineMath str) =
267267 return $ char '$' <> text str <> char '$'
src/Text/Pandoc/Writers/Docbook.hs−4
@@ -248,10 +248,6 @@ inlineToDocbook opts (Quoted _ lst) =
248248 inTagsSimple "quote" $ inlinesToDocbook opts lst
249249inlineToDocbook opts (Cite _ lst) =
250250 inlinesToDocbook opts lst
251−inlineToDocbook _ Apostrophe = char '\''
252−inlineToDocbook _ Ellipses = text "…"
253−inlineToDocbook _ EmDash = text "—"
254−inlineToDocbook _ EnDash = text "–"
255251inlineToDocbook _ (Code _ str) =
256252 inTagsSimple "literal" $ text (escapeStringForXML str)
257253inlineToDocbook opts (Math _ str) = inlinesToDocbook opts $ readTeXMath str
src/Text/Pandoc/Writers/HTML.hs−4
@@ -540,10 +540,6 @@ inlineToHtml opts inline =
540540 (Str str) -> return $ strToHtml str
541541 (Space) -> return $ strToHtml " "
542542 (LineBreak) -> return H.br
543− (EmDash) -> return $ strToHtml "—"
544− (EnDash) -> return $ strToHtml "–"
545− (Ellipses) -> return $ strToHtml "…"
546− (Apostrophe) -> return $ strToHtml "’"
547543 (Emph lst) -> inlineListToHtml opts lst >>= return . H.em
548544 (Strong lst) -> inlineListToHtml opts lst >>= return . H.strong
549545 (Code attr str) -> case highlight formatHtmlInline attr str of
src/Text/Pandoc/Writers/LaTeX.hs+5−8
@@ -162,6 +162,8 @@ stringToLaTeX isUrl = escapeStringUsing latexEscapes
162162 , ('\x201C', "``")
163163 , ('\x201D', "''")
164164 , ('\x2026', "\\ldots{}")
165+ , ('\x2014', "---")
166+ , ('\x2013', "--")
165167 ]
166168
167169-- | Puts contents into LaTeX command.
@@ -201,8 +203,8 @@ blockToLaTeX (CodeBlock (_,classes,keyvalAttr) str) = do
201203 then modify (\s -> s{ stVerbInNote = True }) >>
202204 return "Verbatim"
203205 else return "verbatim"
204− return $ flush (text $ "\\begin{" ++ env ++ "}") $$ text str $$
205− text ("\\end{" ++ env ++ "}") $$ cr -- final cr because of notes
206+ return $ flush (text ("\\begin{" ++ env ++ "}") $$ text str $$
207+ text ("\\end{" ++ env ++ "}")) $$ cr -- final cr because of notes
206208 listingsCodeBlock = do
207209 st <- get
208210 let params = if writerListings (stOptions st)
@@ -236,7 +238,7 @@ blockToLaTeX (CodeBlock (_,classes,keyvalAttr) str) = do
236238 case highlight formatLaTeXBlock ("",classes,keyvalAttr) str of
237239 Nothing -> rawCodeBlock
238240 Just h -> modify (\st -> st{ stHighlighting = True }) >>
239− return (text h)
241+ return (flush $ text h)
240242blockToLaTeX (RawBlock "latex" x) = return $ text x <> blankline
241243blockToLaTeX (RawBlock _ _) = return empty
242244blockToLaTeX (BulletList lst) = do
@@ -365,7 +367,6 @@ inlineListToLaTeX lst = mapM inlineToLaTeX lst >>= return . hcat
365367
366368isQuoted :: Inline -> Bool
367369isQuoted (Quoted _ _) = True
368−isQuoted Apostrophe = True
369370isQuoted _ = False
370371
371372-- | Convert inline element to LaTeX
@@ -441,10 +442,6 @@ inlineToLaTeX (Quoted DoubleQuote lst) = do
441442 then "\\,"
442443 else empty
443444 return $ "``" <> s1 <> contents <> s2 <> "''"
444−inlineToLaTeX Apostrophe = return $ char '\''
445−inlineToLaTeX EmDash = return "---"
446−inlineToLaTeX EnDash = return "--"
447−inlineToLaTeX Ellipses = return "\\ldots{}"
448445inlineToLaTeX (Str str) = return $ text $ stringToLaTeX False str
449446inlineToLaTeX (Math InlineMath str) = return $ char '$' <> text str <> char '$'
450447inlineToLaTeX (Math DisplayMath str) = return $ "\\[" <> text str <> "\\]"
src/Text/Pandoc/Writers/Man.hs+7−5
@@ -98,7 +98,13 @@ noteToMan opts num note = do
9898
9999-- | Association list of characters to escape.
100100manEscapes :: [(Char, String)]
101−manEscapes = [('\160', "\\ "), ('\'', "\\[aq]")] ++ backslashEscapes "@\\"
101+manEscapes = [ ('\160', "\\ ")
102+ , ('\'', "\\[aq]")
103+ , ('’', "'")
104+ , ('\x2014', "\\[em]")
105+ , ('\x2013', "\\[en]")
106+ , ('\x2026', "\\&...")
107+ ] ++ backslashEscapes "@\\"
102108
103109-- | Escape special characters for Man.
104110escapeString :: String -> String
@@ -303,10 +309,6 @@ inlineToMan opts (Quoted DoubleQuote lst) = do
303309 return $ text "\\[lq]" <> contents <> text "\\[rq]"
304310inlineToMan opts (Cite _ lst) =
305311 inlineListToMan opts lst
306−inlineToMan _ EmDash = return $ text "\\[em]"
307−inlineToMan _ EnDash = return $ text "\\[en]"
308−inlineToMan _ Apostrophe = return $ char '\''
309−inlineToMan _ Ellipses = return $ text "\\&..."
310312inlineToMan _ (Code _ str) =
311313 return $ text $ "\\f[C]" ++ escapeCode str ++ "\\f[]"
312314inlineToMan _ (Str str) = return $ text $ escapeString str
src/Text/Pandoc/Writers/Markdown.hs−4
@@ -432,10 +432,6 @@ inlineToMarkdown opts (Quoted SingleQuote lst) = do
432432inlineToMarkdown opts (Quoted DoubleQuote lst) = do
433433 contents <- inlineListToMarkdown opts lst
434434 return $ "“" <> contents <> "”"
435−inlineToMarkdown _ EmDash = return "\8212"
436−inlineToMarkdown _ EnDash = return "\8211"
437−inlineToMarkdown _ Apostrophe = return "\8217"
438−inlineToMarkdown _ Ellipses = return "\8230"
439435inlineToMarkdown opts (Code attr str) =
440436 let tickGroups = filter (\s -> '`' `elem` s) $ group str
441437 longest = if null tickGroups
src/Text/Pandoc/Writers/MediaWiki.hs+2−10
@@ -346,22 +346,14 @@ inlineToMediaWiki opts (SmallCaps lst) = inlineListToMediaWiki opts lst
346346
347347inlineToMediaWiki opts (Quoted SingleQuote lst) = do
348348 contents <- inlineListToMediaWiki opts lst
349− return $ "&lsquo;" ++ contents ++ "&rsquo;"
349+ return $ "\8216" ++ contents ++ "\8217"
350350
351351inlineToMediaWiki opts (Quoted DoubleQuote lst) = do
352352 contents <- inlineListToMediaWiki opts lst
353− return $ "&ldquo;" ++ contents ++ "&rdquo;"
353+ return $ "\8220" ++ contents ++ "\8221"
354354
355355inlineToMediaWiki opts (Cite _ lst) = inlineListToMediaWiki opts lst
356356
357−inlineToMediaWiki _ EmDash = return "&mdash;"
358−
359−inlineToMediaWiki _ EnDash = return "&ndash;"
360−
361−inlineToMediaWiki _ Apostrophe = return "&rsquo;"
362−
363−inlineToMediaWiki _ Ellipses = return "&hellip;"
364−
365357inlineToMediaWiki _ (Code _ str) =
366358 return $ "<tt>" ++ (escapeString str) ++ "</tt>"
367359
src/Text/Pandoc/Writers/OpenDocument.hs+2−6
@@ -154,8 +154,8 @@ inHeaderTags i d =
154154 , ("text:outline-level", show i)] d
155155
156156inQuotes :: QuoteType -> Doc -> Doc
157−inQuotes SingleQuote s = text "&#8216;" <> s <> text "&#8217;"
158−inQuotes DoubleQuote s = text "&#8220;" <> s <> text "&#8221;"
157+inQuotes SingleQuote s = char '\8216' <> s <> char '\8217'
158+inQuotes DoubleQuote s = char '\8220' <> s <> char '\8221'
159159
160160handleSpaces :: String -> Doc
161161handleSpaces s
@@ -361,10 +361,6 @@ inlinesToOpenDocument o l = hcat <$> mapM (inlineToOpenDocument o) l
361361-- | Convert an inline element to OpenDocument.
362362inlineToOpenDocument :: WriterOptions -> Inline -> State WriterState Doc
363363inlineToOpenDocument o ils
364− | Ellipses <- ils = inTextStyle $ text "&#8230;"
365− | EmDash <- ils = inTextStyle $ text "&#8212;"
366− | EnDash <- ils = inTextStyle $ text "&#8211;"
367− | Apostrophe <- ils = inTextStyle $ text "&#8217;"
368364 | Space <- ils = inTextStyle space
369365 | LineBreak <- ils = return $ selfClosingTag "text:line-break" []
370366 | Str s <- ils = inTextStyle $ handleSpaces $ escapeStringForXML s
src/Text/Pandoc/Writers/Org.hs+6−5
@@ -95,7 +95,12 @@ noteToOrg num note = do
9595
9696-- | Escape special characters for Org.
9797escapeString :: String -> String
98−escapeString = escapeStringUsing (backslashEscapes "^_")
98+escapeString = escapeStringUsing $
99+ [ ('\x2014',"---")
100+ , ('\x2013',"--")
101+ , ('\x2019',"'")
102+ , ('\x2026',"...")
103+ ] ++ backslashEscapes "^_"
99104
100105titleToOrg :: [Inline] -> State WriterState Doc
101106titleToOrg [] = return empty
@@ -249,10 +254,6 @@ inlineToOrg (Quoted DoubleQuote lst) = do
249254 contents <- inlineListToOrg lst
250255 return $ "\"" <> contents <> "\""
251256inlineToOrg (Cite _ lst) = inlineListToOrg lst
252−inlineToOrg EmDash = return "---"
253−inlineToOrg EnDash = return "--"
254−inlineToOrg Apostrophe = return "'"
255−inlineToOrg Ellipses = return "..."
256257inlineToOrg (Code _ str) = return $ "=" <> text str <> "="
257258inlineToOrg (Str str) = return $ text $ escapeString str
258259inlineToOrg (Math t str) = do
src/Text/Pandoc/Writers/RST.hs−4
@@ -281,10 +281,6 @@ inlineToRST (Quoted DoubleQuote lst) = do
281281 return $ "“" <> contents <> "”"
282282inlineToRST (Cite _ lst) =
283283 inlineListToRST lst
284−inlineToRST EmDash = return $ char '\8212'
285−inlineToRST EnDash = return $ char '\8211'
286−inlineToRST Apostrophe = return $ char '\8217'
287−inlineToRST Ellipses = return $ char '\8230'
288284inlineToRST (Code _ str) = return $ "``" <> text str <> "``"
289285inlineToRST (Str str) = return $ text $ escapeString str
290286inlineToRST (Math t str) = do
src/Text/Pandoc/Writers/RTF.hs+9−5
@@ -106,7 +106,15 @@ handleUnicode (c:cs) =
106106
107107-- | Escape special characters.
108108escapeSpecial :: String -> String
109−escapeSpecial = escapeStringUsing (('\t',"\\tab "):(backslashEscapes "{\\}"))
109+escapeSpecial = escapeStringUsing $
110+ [ ('\t',"\\tab ")
111+ , ('\8216',"\\u8216'")
112+ , ('\8217',"\\u8217'")
113+ , ('\8220',"\\u8220\"")
114+ , ('\8221',"\\u8221\"")
115+ , ('\8211',"\\u8211-")
116+ , ('\8212',"\\u8212-")
117+ ] ++ backslashEscapes "{\\}"
110118
111119-- | Escape strings as needed for rich text format.
112120stringToRTF :: String -> String
@@ -287,10 +295,6 @@ inlineToRTF (Quoted SingleQuote lst) =
287295 "\\u8216'" ++ (inlineListToRTF lst) ++ "\\u8217'"
288296inlineToRTF (Quoted DoubleQuote lst) =
289297 "\\u8220\"" ++ (inlineListToRTF lst) ++ "\\u8221\""
290−inlineToRTF Apostrophe = "\\u8217'"
291−inlineToRTF Ellipses = "\\u8230?"
292−inlineToRTF EmDash = "\\u8212-"
293−inlineToRTF EnDash = "\\u8211-"
294298inlineToRTF (Code _ str) = "{\\f1 " ++ (codeStringToRTF str) ++ "}"
295299inlineToRTF (Str str) = stringToRTF str
296300inlineToRTF (Math _ str) = inlineListToRTF $ readTeXMath str
src/Text/Pandoc/Writers/Texinfo.hs+4−4
@@ -96,6 +96,10 @@ stringToTexinfo = escapeStringUsing texinfoEscapes
9696 , ('@', "@@")
9797 , (',', "@comma{}") -- only needed in argument lists
9898 , ('\160', "@ ")
99+ , ('\x2014', "---")
100+ , ('\x2013', "--")
101+ , ('\x2026', "@dots{}")
102+ , ('\x2019', "'")
99103 ]
100104
101105-- | Puts contents into Texinfo command.
@@ -387,10 +391,6 @@ inlineToTexinfo (Quoted DoubleQuote lst) = do
387391
388392inlineToTexinfo (Cite _ lst) =
389393 inlineListToTexinfo lst
390−inlineToTexinfo Apostrophe = return $ char '\''
391−inlineToTexinfo EmDash = return $ text "---"
392−inlineToTexinfo EnDash = return $ text "--"
393−inlineToTexinfo Ellipses = return $ text "@dots{}"
394394inlineToTexinfo (Str str) = return $ text (stringToTexinfo str)
395395inlineToTexinfo (Math _ str) = return $ inCmd "math" $ text str
396396inlineToTexinfo (RawInline f str) | f == "latex" || f == "tex" =
src/Text/Pandoc/Writers/Textile.hs+13−17
@@ -72,15 +72,19 @@ withUseTags action = do
7272-- | Escape one character as needed for Textile.
7373escapeCharForTextile :: Char -> String
7474escapeCharForTextile x = case x of
75− '&' -> "&amp;"
76− '<' -> "&lt;"
77− '>' -> "&gt;"
78− '"' -> "&quot;"
79− '*' -> "&#42;"
80− '_' -> "&#95;"
81− '@' -> "&#64;"
82− '|' -> "&#124;"
83− c -> [c]
75+ '&' -> "&amp;"
76+ '<' -> "&lt;"
77+ '>' -> "&gt;"
78+ '"' -> "&quot;"
79+ '*' -> "&#42;"
80+ '_' -> "&#95;"
81+ '@' -> "&#64;"
82+ '|' -> "&#124;"
83+ '\x2014' -> " -- "
84+ '\x2013' -> " - "
85+ '\x2019' -> "'"
86+ '\x2026' -> "..."
87+ c -> [c]
8488
8589-- | Escape string as needed for Textile.
8690escapeStringForTextile :: String -> String
@@ -370,14 +374,6 @@ inlineToTextile opts (Quoted DoubleQuote lst) = do
370374
371375inlineToTextile opts (Cite _ lst) = inlineListToTextile opts lst
372376
373−inlineToTextile _ EmDash = return " -- "
374−
375−inlineToTextile _ EnDash = return " - "
376−
377−inlineToTextile _ Apostrophe = return "'"
378−
379−inlineToTextile _ Ellipses = return "..."
380−
381377inlineToTextile _ (Code _ str) =
382378 return $ if '@' `elem` str
383379 then "<tt>" ++ escapeStringForXML str ++ "</tt>"
tests/latex-reader.native+21−21
@@ -1,5 +1,5 @@
11Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docAuthors = [[Str "John",Space,Str "MacFarlane"],[Str "Anonymous"]], docDate = [Str "July",Space,Str "17,",Space,Str "2006"]})
2−[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc.",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",Space,Str "John",Space,Str "Gruber",Apostrophe,Str "s",Space,Str "markdown",Space,Str "test",Space,Str "suite."]
2+[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc.",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",Space,Str "John",Space,Str "Gruber",Str "\8217",Str "s",Space,Str "markdown",Space,Str "test",Space,Str "suite."]
33,HorizontalRule
44,Header 1 [Str "Headers"]
55,Header 2 [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link [Str "embedded",Space,Str "link"] ("/url","")]
@@ -14,9 +14,9 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
1414,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"]
1515,HorizontalRule
1616,Header 1 [Str "Paragraphs"]
17−,Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "regular",Space,Str "paragraph."]
17+,Para [Str "Here",Str "\8217",Str "s",Space,Str "a",Space,Str "regular",Space,Str "paragraph."]
1818,Para [Str "In",Space,Str "Markdown",Space,Str "1.0.0",Space,Str "and",Space,Str "earlier.",Space,Str "Version",Space,Str "8.",Space,Str "This",Space,Str "line",Space,Str "turns",Space,Str "into",Space,Str "a",Space,Str "list",Space,Str "item.",Space,Str "Because",Space,Str "a",Space,Str "hard",Str "-",Str "wrapped",Space,Str "line",Space,Str "in",Space,Str "the",Space,Str "middle",Space,Str "of",Space,Str "a",Space,Str "paragraph",Space,Str "looked",Space,Str "like",Space,Str "a",Space,Str "list",Space,Str "item."]
19−,Para [Str "Here",Apostrophe,Str "s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet.",Space,Str "*",Space,Str "criminey."]
19+,Para [Str "Here",Str "\8217",Str "s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet.",Space,Str "*",Space,Str "criminey."]
2020,Para [Str "There",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "hard",Space,Str "line",Space,Str "break",LineBreak,Str "here."]
2121,HorizontalRule
2222,Header 1 [Str "Block",Space,Str "Quotes"]
@@ -44,11 +44,11 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
4444 [OrderedList (1,Decimal,Period)
4545 [[Para [Str "do",Space,Str "laundry"]]
4646 ,[Para [Str "take",Space,Str "out",Space,Str "the",Space,Str "trash"]]]]
47−,Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "nested",Space,Str "one:"]
47+,Para [Str "Here",Str "\8217",Str "s",Space,Str "a",Space,Str "nested",Space,Str "one:"]
4848,BlockQuote
4949 [Para [Str "Joe",Space,Str "said:"]
5050 ,BlockQuote
51− [Para [Str "Don",Apostrophe,Str "t",Space,Str "quote",Space,Str "me."]]]
51+ [Para [Str "Don",Str "\8217",Str "t",Space,Str "quote",Space,Str "me."]]]
5252,Para [Str "And",Space,Str "a",Space,Str "following",Space,Str "paragraph."]
5353,HorizontalRule
5454,Header 1 [Str "Code",Space,Str "Blocks"]
@@ -113,7 +113,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
113113,Para [Str "Multiple",Space,Str "paragraphs:"]
114114,OrderedList (1,Decimal,Period)
115115 [[Para [Str "Item",Space,Str "1,",Space,Str "graf",Space,Str "one."]
116− ,Para [Str "Item",Space,Str "1.",Space,Str "graf",Space,Str "two.",Space,Str "The",Space,Str "quick",Space,Str "brown",Space,Str "fox",Space,Str "jumped",Space,Str "over",Space,Str "the",Space,Str "lazy",Space,Str "dog",Apostrophe,Str "s",Space,Str "back."]]
116+ ,Para [Str "Item",Space,Str "1.",Space,Str "graf",Space,Str "two.",Space,Str "The",Space,Str "quick",Space,Str "brown",Space,Str "fox",Space,Str "jumped",Space,Str "over",Space,Str "the",Space,Str "lazy",Space,Str "dog",Str "\8217",Str "s",Space,Str "back."]]
117117 ,[Para [Str "Item",Space,Str "2."]]
118118 ,[Para [Str "Item",Space,Str "3."]]]
119119,Header 2 [Str "Nested"]
@@ -123,7 +123,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
123123 [[Para [Str "Tab"]
124124 ,BulletList
125125 [[Para [Str "Tab"]]]]]]]
126−,Para [Str "Here",Apostrophe,Str "s",Space,Str "another:"]
126+,Para [Str "Here",Str "\8217",Str "s",Space,Str "another:"]
127127,OrderedList (1,Decimal,Period)
128128 [[Para [Str "First"]]
129129 ,[Para [Str "Second:"]
@@ -217,7 +217,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
217217,Para [Str "Simple",Space,Str "block",Space,Str "on",Space,Str "one",Space,Str "line:"]
218218,Para [Str "foo",Space,Str "And",Space,Str "nested",Space,Str "without",Space,Str "indentation:"]
219219,Para [Str "foo",Space,Str "bar",Space,Str "Interpreted",Space,Str "markdown",Space,Str "in",Space,Str "a",Space,Str "table:"]
220−,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Space,Str "And",Space,Str "this",Space,Str "is",Space,Strong [Str "strong"],Space,Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "simple",Space,Str "block:"]
220+,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Space,Str "And",Space,Str "this",Space,Str "is",Space,Strong [Str "strong"],Space,Str "Here",Str "\8217",Str "s",Space,Str "a",Space,Str "simple",Space,Str "block:"]
221221,Para [Str "foo",Space,Str "This",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "code",Space,Str "block,",Space,Str "though:"]
222222,CodeBlock ("",[],[]) "<div>\n foo\n</div>"
223223,Para [Str "As",Space,Str "should",Space,Str "this:"]
@@ -230,7 +230,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
230230,Para [Str "Just",Space,Str "plain",Space,Str "comment,",Space,Str "with",Space,Str "trailing",Space,Str "spaces",Space,Str "on",Space,Str "the",Space,Str "line:"]
231231,Para [Str "Code:"]
232232,CodeBlock ("",[],[]) "<hr />"
233−,Para [Str "Hr",Apostrophe,Str "s:"]
233+,Para [Str "Hr",Str "\8217",Str "s:"]
234234,HorizontalRule
235235,Header 1 [Str "Inline",Space,Str "Markup"]
236236,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ",",Space,Str "and",Space,Str "so",Space,Emph [Str "is",Space,Str "this"],Str "."]
@@ -250,11 +250,11 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
250250,Para [Quoted DoubleQuote [Str "Hello,"],Space,Str "said",Space,Str "the",Space,Str "spider.",Space,Quoted DoubleQuote [Quoted SingleQuote [Str "Shelob"],Space,Str "is",Space,Str "my",Space,Str "name."]]
251251,Para [Quoted SingleQuote [Str "A"],Str ",",Space,Quoted SingleQuote [Str "B"],Str ",",Space,Str "and",Space,Quoted SingleQuote [Str "C"],Space,Str "are",Space,Str "letters."]
252252,Para [Quoted SingleQuote [Str "Oak,"],Space,Quoted SingleQuote [Str "elm,"],Space,Str "and",Space,Quoted SingleQuote [Str "beech"],Space,Str "are",Space,Str "names",Space,Str "of",Space,Str "trees.",Space,Str "So",Space,Str "is",Space,Quoted SingleQuote [Str "pine."]]
253−,Para [Quoted SingleQuote [Str "He",Space,Str "said,",Space,Quoted DoubleQuote [Str "I",Space,Str "want",Space,Str "to",Space,Str "go."]],Space,Str "Were",Space,Str "you",Space,Str "alive",Space,Str "in",Space,Str "the",Space,Str "70",Apostrophe,Str "s?"]
253+,Para [Quoted SingleQuote [Str "He",Space,Str "said,",Space,Quoted DoubleQuote [Str "I",Space,Str "want",Space,Str "to",Space,Str "go."]],Space,Str "Were",Space,Str "you",Space,Str "alive",Space,Str "in",Space,Str "the",Space,Str "70",Str "\8217",Str "s?"]
254254,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "quoted",Space,Quoted SingleQuote [Code ("",[],[]) "code"],Space,Str "and",Space,Str "a",Space,Quoted DoubleQuote [Link [Str "quoted",Space,Str "link"] ("http://example.com/?foo=1&bar=2","")],Str "."]
255−,Para [Str "Some",Space,Str "dashes:",Space,Str "one",EmDash,Str "two",EmDash,Str "three",EmDash,Str "four",EmDash,Str "five."]
256−,Para [Str "Dashes",Space,Str "between",Space,Str "numbers:",Space,Str "5",EnDash,Str "7,",Space,Str "255",EnDash,Str "66,",Space,Str "1987",EnDash,Str "1999."]
257−,Para [Str "Ellipses",Ellipses,Str "and",Ellipses,Str "and",Ellipses,Str "."]
255+,Para [Str "Some",Space,Str "dashes:",Space,Str "one",Str "\8212",Str "two",Str "\8212",Str "three",Str "\8212",Str "four",Str "\8212",Str "five."]
256+,Para [Str "Dashes",Space,Str "between",Space,Str "numbers:",Space,Str "5",Str "-",Str "7,",Space,Str "255",Str "-",Str "66,",Space,Str "1987",Str "-",Str "1999."]
257+,Para [Str "Ellipses",Str "\8230",Str "and",Str "\8230",Str "and",Str "\8230",Str "."]
258258,HorizontalRule
259259,Header 1 [Str "LaTeX"]
260260,BulletList
@@ -266,13 +266,13 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
266266 ,[Para [Math InlineMath "223"]]
267267 ,[Para [Math InlineMath "p",Str "-",Str "Tree"]]
268268 ,[Para [Math InlineMath "\\frac{d}{dx}f(x)=\\lim_{h\\to 0}\\frac{f(x+h)-f(x)}{h}"]]
269− ,[Para [Str "Here",Apostrophe,Str "s",Space,Str "one",Space,Str "that",Space,Str "has",Space,Str "a",Space,Str "line",Space,Str "break",Space,Str "in",Space,Str "it:",Space,Math InlineMath "\\alpha + \\omega \\times x^2",Str "."]]]
270−,Para [Str "These",Space,Str "shouldn",Apostrophe,Str "t",Space,Str "be",Space,Str "math:"]
269+ ,[Para [Str "Here",Str "\8217",Str "s",Space,Str "one",Space,Str "that",Space,Str "has",Space,Str "a",Space,Str "line",Space,Str "break",Space,Str "in",Space,Str "it:",Space,Math InlineMath "\\alpha + \\omega \\times x^2",Str "."]]]
270+,Para [Str "These",Space,Str "shouldn",Str "\8217",Str "t",Space,Str "be",Space,Str "math:"]
271271,BulletList
272272 [[Para [Str "To",Space,Str "get",Space,Str "the",Space,Str "famous",Space,Str "equation,",Space,Str "write",Space,Code ("",[],[]) "$e = mc^2$",Str "."]]
273273 ,[Para [Str "$",Str "22,000",Space,Str "is",Space,Str "a",Space,Emph [Str "lot"],Space,Str "of",Space,Str "money.",Space,Str "So",Space,Str "is",Space,Str "$",Str "34,000.",Space,Str "(It",Space,Str "worked",Space,Str "if",Space,Quoted DoubleQuote [Str "lot"],Space,Str "is",Space,Str "emphasized.)"]]
274274 ,[Para [Str "Escaped",Space,Code ("",[],[]) "$",Str ":",Space,Str "$",Str "73",Space,Emph [Str "this",Space,Str "should",Space,Str "be",Space,Str "emphasized"],Space,Str "23",Str "$",Str "."]]]
275−,Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "LaTeX",Space,Str "table:"]
275+,Para [Str "Here",Str "\8217",Str "s",Space,Str "a",Space,Str "LaTeX",Space,Str "table:"]
276276,Table [] [AlignLeft,AlignLeft] [0.0,0.0]
277277 [[Plain [Str "Animal"]]
278278 ,[Plain [Str "Number"]]]
@@ -336,10 +336,10 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
336336,Para [Str "Foo",Space,Link [Str "bar"] ("/url/",""),Str "."]
337337,Para [Str "Foo",Space,Link [Str "biz"] ("/url/",""),Str "."]
338338,Header 2 [Str "With",Space,Str "ampersands"]
339−,Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Link [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."]
340−,Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text:",Space,Link [Str "AT",Str "&",Str "T"] ("http://att.com/",""),Str "."]
341−,Para [Str "Here",Apostrophe,Str "s",Space,Str "an",Space,Link [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."]
342−,Para [Str "Here",Apostrophe,Str "s",Space,Str "an",Space,Link [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] ("/script?foo=1&bar=2",""),Str "."]
339+,Para [Str "Here",Str "\8217",Str "s",Space,Str "a",Space,Link [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."]
340+,Para [Str "Here",Str "\8217",Str "s",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text:",Space,Link [Str "AT",Str "&",Str "T"] ("http://att.com/",""),Str "."]
341+,Para [Str "Here",Str "\8217",Str "s",Space,Str "an",Space,Link [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."]
342+,Para [Str "Here",Str "\8217",Str "s",Space,Str "an",Space,Link [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] ("/script?foo=1&bar=2",""),Str "."]
343343,Header 2 [Str "Autolinks"]
344344,Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link [Code ("",["url"],[]) "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")]
345345,BulletList
@@ -358,7 +358,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
358358,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "image"] ("movie.jpg",""),Space,Str "icon."]
359359,HorizontalRule
360360,Header 1 [Str "Footnotes"]
361−,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Note [Para [Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote.",Space,Str "It",Space,Str "can",Space,Str "go",Space,Str "anywhere",Space,Str "after",Space,Str "the",Space,Str "footnote",Space,Str "reference.",Space,Str "It",Space,Str "need",Space,Str "not",Space,Str "be",Space,Str "placed",Space,Str "at",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "document."]],Space,Str "and",Space,Str "another.",Note [Para [Str "Here",Apostrophe,Str "s",Space,Str "the",Space,Str "long",Space,Str "note.",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",Space,Str "blocks."],Para [Str "Subsequent",Space,Str "blocks",Space,Str "are",Space,Str "indented",Space,Str "to",Space,Str "show",Space,Str "that",Space,Str "they",Space,Str "belong",Space,Str "to",Space,Str "the",Space,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "list",Space,Str "items)."],CodeBlock ("",[],[]) " { <code> }",Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "indent",Space,Str "every",Space,Str "line,",Space,Str "but",Space,Str "you",Space,Str "can",Space,Str "also",Space,Str "be",Space,Str "lazy",Space,Str "and",Space,Str "just",Space,Str "indent",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "each",Space,Str "block."]],Space,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Space,Str "because",Space,Str "it",Space,Str "contains",Space,Str "a",Space,Str "space.",Str "[",Str "^",Str "my",Space,Str "note",Str "]",Space,Str "Here",Space,Str "is",Space,Str "an",Space,Str "inline",Space,Str "note.",Note [Para [Str "This",Space,Str "is",Space,Emph [Str "easier"],Space,Str "to",Space,Str "type.",Space,Str "Inline",Space,Str "notes",Space,Str "may",Space,Str "contain",Space,Link [Str "links"] ("http://google.com",""),Space,Str "and",Space,Code ("",[],[]) "]",Space,Str "verbatim",Space,Str "characters,",Space,Str "as",Space,Str "well",Space,Str "as",Space,Str "[",Str "bracketed",Space,Str "text",Str "]",Str "."]]]
361+,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Note [Para [Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote.",Space,Str "It",Space,Str "can",Space,Str "go",Space,Str "anywhere",Space,Str "after",Space,Str "the",Space,Str "footnote",Space,Str "reference.",Space,Str "It",Space,Str "need",Space,Str "not",Space,Str "be",Space,Str "placed",Space,Str "at",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "document."]],Space,Str "and",Space,Str "another.",Note [Para [Str "Here",Str "\8217",Str "s",Space,Str "the",Space,Str "long",Space,Str "note.",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",Space,Str "blocks."],Para [Str "Subsequent",Space,Str "blocks",Space,Str "are",Space,Str "indented",Space,Str "to",Space,Str "show",Space,Str "that",Space,Str "they",Space,Str "belong",Space,Str "to",Space,Str "the",Space,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "list",Space,Str "items)."],CodeBlock ("",[],[]) " { <code> }",Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "indent",Space,Str "every",Space,Str "line,",Space,Str "but",Space,Str "you",Space,Str "can",Space,Str "also",Space,Str "be",Space,Str "lazy",Space,Str "and",Space,Str "just",Space,Str "indent",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "each",Space,Str "block."]],Space,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Space,Str "because",Space,Str "it",Space,Str "contains",Space,Str "a",Space,Str "space.",Str "[",Str "^",Str "my",Space,Str "note",Str "]",Space,Str "Here",Space,Str "is",Space,Str "an",Space,Str "inline",Space,Str "note.",Note [Para [Str "This",Space,Str "is",Space,Emph [Str "easier"],Space,Str "to",Space,Str "type.",Space,Str "Inline",Space,Str "notes",Space,Str "may",Space,Str "contain",Space,Link [Str "links"] ("http://google.com",""),Space,Str "and",Space,Code ("",[],[]) "]",Space,Str "verbatim",Space,Str "characters,",Space,Str "as",Space,Str "well",Space,Str "as",Space,Str "[",Str "bracketed",Space,Str "text",Str "]",Str "."]]]
362362,BlockQuote
363363 [Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes.",Note [Para [Str "In",Space,Str "quote."]]]]
364364,OrderedList (1,Decimal,Period)
tests/rst-reader.native+12−12
@@ -3,26 +3,26 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ":
33 [([Str "Revision"],
44 [[Para [Str "3"]]])]
55,Header 1 [Str "Level",Space,Str "one",Space,Str "header"]
6−,Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc",Str ".",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",Space,Str "John",Space,Str "Gruber",Apostrophe,Str "s",Space,Str "markdown",Space,Str "test",Space,Str "suite",Str "."]
6+,Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc",Str ".",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",Space,Str "John",Space,Str "Gruber",Str "\8217",Str "s",Space,Str "markdown",Space,Str "test",Space,Str "suite",Str "."]
77,Header 2 [Str "Level",Space,Str "two",Space,Str "header"]
88,Header 3 [Str "Level",Space,Str "three"]
99,Header 4 [Str "Level",Space,Str "four",Space,Str "with",Space,Emph [Str "emphasis"]]
1010,Header 5 [Str "Level",Space,Str "five"]
1111,Header 1 [Str "Paragraphs"]
12−,Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "regular",Space,Str "paragraph",Str "."]
12+,Para [Str "Here",Str "\8217",Str "s",Space,Str "a",Space,Str "regular",Space,Str "paragraph",Str "."]
1313,Para [Str "In",Space,Str "Markdown",Space,Str "1",Str ".",Str "0",Str ".",Str "0",Space,Str "and",Space,Str "earlier",Str ".",Space,Str "Version",Space,Str "8",Str ".",Space,Str "This",Space,Str "line",Space,Str "turns",Space,Str "into",Space,Str "a",Space,Str "list",Space,Str "item",Str ".",Space,Str "Because",Space,Str "a",Space,Str "hard",Str "-",Str "wrapped",Space,Str "line",Space,Str "in",Space,Str "the",Space,Str "middle",Space,Str "of",Space,Str "a",Space,Str "paragraph",Space,Str "looked",Space,Str "like",Space,Str "a",Space,Str "list",Space,Str "item",Str "."]
14−,Para [Str "Here",Apostrophe,Str "s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet",Str ".",Space,Str "*",Space,Str "criminey",Str "."]
14+,Para [Str "Here",Str "\8217",Str "s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet",Str ".",Space,Str "*",Space,Str "criminey",Str "."]
1515,Para [Str "Horizontal",Space,Str "rule",Str ":"]
1616,HorizontalRule
1717,Para [Str "Another",Str ":"]
1818,HorizontalRule
1919,Header 1 [Str "Block",Space,Str "Quotes"]
20−,Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "block",Space,Str "quote",Str ":"]
20+,Para [Str "Here",Str "\8217",Str "s",Space,Str "a",Space,Str "block",Space,Str "quote",Str ":"]
2121,BlockQuote
2222 [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote",Str ".",Space,Str "It",Space,Str "is",Space,Str "pretty",Space,Str "short",Str "."]]
23−,Para [Str "Here",Apostrophe,Str "s",Space,Str "another,",Space,Str "differently",Space,Str "indented",Str ":"]
23+,Para [Str "Here",Str "\8217",Str "s",Space,Str "another,",Space,Str "differently",Space,Str "indented",Str ":"]
2424,BlockQuote
25− [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote",Str ".",Space,Str "It",Apostrophe,Str "s",Space,Str "indented",Space,Str "with",Space,Str "a",Space,Str "tab",Str "."]
25+ [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote",Str ".",Space,Str "It",Str "\8217",Str "s",Space,Str "indented",Space,Str "with",Space,Str "a",Space,Str "tab",Str "."]
2626 ,Para [Str "Code",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote",Str ":"]
2727 ,CodeBlock ("",[],[]) "sub status {\n print \"working\";\n}"
2828 ,Para [Str "List",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote",Str ":"]
@@ -98,7 +98,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ":
9898,Para [Str "Multiple",Space,Str "paragraphs",Str ":"]
9999,OrderedList (1,Decimal,Period)
100100 [[Para [Str "Item",Space,Str "1,",Space,Str "graf",Space,Str "one",Str "."]
101− ,Para [Str "Item",Space,Str "1",Str ".",Space,Str "graf",Space,Str "two",Str ".",Space,Str "The",Space,Str "quick",Space,Str "brown",Space,Str "fox",Space,Str "jumped",Space,Str "over",Space,Str "the",Space,Str "lazy",Space,Str "dog",Apostrophe,Str "s",Space,Str "back",Str "."]]
101+ ,Para [Str "Item",Space,Str "1",Str ".",Space,Str "graf",Space,Str "two",Str ".",Space,Str "The",Space,Str "quick",Space,Str "brown",Space,Str "fox",Space,Str "jumped",Space,Str "over",Space,Str "the",Space,Str "lazy",Space,Str "dog",Str "\8217",Str "s",Space,Str "back",Str "."]]
102102 ,[Para [Str "Item",Space,Str "2",Str "."]]
103103 ,[Para [Str "Item",Space,Str "3",Str "."]]]
104104,Para [Str "Nested",Str ":"]
@@ -108,7 +108,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ":
108108 [[Para [Str "Tab"]
109109 ,BulletList
110110 [[Plain [Str "Tab"]]]]]]]
111−,Para [Str "Here",Apostrophe,Str "s",Space,Str "another",Str ":"]
111+,Para [Str "Here",Str "\8217",Str "s",Space,Str "another",Str ":"]
112112,OrderedList (1,Decimal,Period)
113113 [[Para [Str "First"]]
114114 ,[Para [Str "Second",Str ":"]
@@ -165,14 +165,14 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ":
165165 ,([Str "city"],
166166 [[Para [Emph [Str "Nowhere"],Str ",",Space,Str "MA,",Space,Str "USA"]]])
167167 ,([Str "phone"],
168− [[Para [Str "123",EnDash,Str "4567"]]])]]
168+ [[Para [Str "123",Str "\8211",Str "4567"]]])]]
169169,DefinitionList
170170 [([Str "address"],
171171 [[Para [Str "61",Space,Str "Main",Space,Str "St",Str "."]]])
172172 ,([Str "city"],
173173 [[Para [Emph [Str "Nowhere"],Str ",",Space,Str "MA,",Space,Str "USA"]]])
174174 ,([Str "phone"],
175− [[Para [Str "123",EnDash,Str "4567"]]])]
175+ [[Para [Str "123",Str "\8211",Str "4567"]]])]
176176,Header 1 [Str "HTML",Space,Str "Blocks"]
177177,Para [Str "Simple",Space,Str "block",Space,Str "on",Space,Str "one",Space,Str "line",Str ":"]
178178,RawBlock "html" "<div>foo</div>\n"
@@ -216,8 +216,8 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ":
216216,Para [Str "Explicit",Str ":",Space,Str "a",Space,Link [Str "URL"] ("/url/",""),Str "."]
217217,Para [Str "Two",Space,Str "anonymous",Space,Str "links",Str ":",Space,Link [Str "the",Space,Str "first"] ("/url1/",""),Space,Str "and",Space,Link [Str "the",Space,Str "second"] ("/url2/","")]
218218,Para [Str "Reference",Space,Str "links",Str ":",Space,Link [Str "link1"] ("/url1/",""),Space,Str "and",Space,Link [Str "link2"] ("/url2/",""),Space,Str "and",Space,Link [Str "link1"] ("/url1/",""),Space,Str "again",Str "."]
219−,Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Link [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."]
220−,Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text",Str ":",Space,Link [Str "AT&T"] ("/url/",""),Str "."]
219+,Para [Str "Here",Str "\8217",Str "s",Space,Str "a",Space,Link [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."]
220+,Para [Str "Here",Str "\8217",Str "s",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text",Str ":",Space,Link [Str "AT&T"] ("/url/",""),Str "."]
221221,Para [Str "Autolinks",Str ":",Space,Link [Str "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2",""),Space,Str "and",Space,Link [Str "nobody@nowhere.net"] ("mailto:nobody@nowhere.net",""),Str "."]
222222,Para [Str "But",Space,Str "not",Space,Str "here",Str ":"]
223223,CodeBlock ("",[],[]) "http://example.com/"
tests/testsuite.native+20−20
@@ -1,5 +1,5 @@
11Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docAuthors = [[Str "John",Space,Str "MacFarlane"],[Str "Anonymous"]], docDate = [Str "July",Space,Str "17",Str ",",Space,Str "2006"]})
2−[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc",Str ".",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",Space,Str "John",Space,Str "Gruber",Apostrophe,Str "s",Space,Str "markdown",Space,Str "test",Space,Str "suite",Str "."]
2+[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc",Str ".",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",Space,Str "John",Space,Str "Gruber\8217s",Space,Str "markdown",Space,Str "test",Space,Str "suite",Str "."]
33,HorizontalRule
44,Header 1 [Str "Headers"]
55,Header 2 [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link [Str "embedded",Space,Str "link"] ("/url","")]
@@ -14,9 +14,9 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
1414,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"]
1515,HorizontalRule
1616,Header 1 [Str "Paragraphs"]
17−,Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "regular",Space,Str "paragraph",Str "."]
17+,Para [Str "Here\8217s",Space,Str "a",Space,Str "regular",Space,Str "paragraph",Str "."]
1818,Para [Str "In",Space,Str "Markdown",Space,Str "1",Str ".",Str "0",Str ".",Str "0",Space,Str "and",Space,Str "earlier",Str ".",Space,Str "Version",Space,Str "8",Str ".",Space,Str "This",Space,Str "line",Space,Str "turns",Space,Str "into",Space,Str "a",Space,Str "list",Space,Str "item",Str ".",Space,Str "Because",Space,Str "a",Space,Str "hard",Str "-",Str "wrapped",Space,Str "line",Space,Str "in",Space,Str "the",Space,Str "middle",Space,Str "of",Space,Str "a",Space,Str "paragraph",Space,Str "looked",Space,Str "like",Space,Str "a",Space,Str "list",Space,Str "item",Str "."]
19−,Para [Str "Here",Apostrophe,Str "s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet",Str ".",Space,Str "*",Space,Str "criminey",Str "."]
19+,Para [Str "Here\8217s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet",Str ".",Space,Str "*",Space,Str "criminey",Str "."]
2020,Para [Str "There",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "hard",Space,Str "line",Space,Str "break",LineBreak,Str "here",Str "."]
2121,HorizontalRule
2222,Header 1 [Str "Block",Space,Str "Quotes"]
@@ -100,7 +100,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
100100,Para [Str "Multiple",Space,Str "paragraphs",Str ":"]
101101,OrderedList (1,Decimal,Period)
102102 [[Para [Str "Item",Space,Str "1",Str ",",Space,Str "graf",Space,Str "one",Str "."]
103− ,Para [Str "Item",Space,Str "1",Str ".",Space,Str "graf",Space,Str "two",Str ".",Space,Str "The",Space,Str "quick",Space,Str "brown",Space,Str "fox",Space,Str "jumped",Space,Str "over",Space,Str "the",Space,Str "lazy",Space,Str "dog",Apostrophe,Str "s",Space,Str "back",Str "."]]
103+ ,Para [Str "Item",Space,Str "1",Str ".",Space,Str "graf",Space,Str "two",Str ".",Space,Str "The",Space,Str "quick",Space,Str "brown",Space,Str "fox",Space,Str "jumped",Space,Str "over",Space,Str "the",Space,Str "lazy",Space,Str "dog\8217s",Space,Str "back",Str "."]]
104104 ,[Para [Str "Item",Space,Str "2",Str "."]]
105105 ,[Para [Str "Item",Space,Str "3",Str "."]]]
106106,Header 2 [Str "Nested"]
@@ -110,7 +110,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
110110 [[Plain [Str "Tab"]
111111 ,BulletList
112112 [[Plain [Str "Tab"]]]]]]]
113−,Para [Str "Here",Apostrophe,Str "s",Space,Str "another",Str ":"]
113+,Para [Str "Here\8217s",Space,Str "another",Str ":"]
114114,OrderedList (1,Decimal,Period)
115115 [[Plain [Str "First"]]
116116 ,[Plain [Str "Second",Str ":"]
@@ -243,7 +243,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
243243,RawBlock "html" "</td>\n<td>"
244244,Plain [Str "And",Space,Str "this",Space,Str "is",Space,Strong [Str "strong"]]
245245,RawBlock "html" "</td>\n</tr>\n</table>\n\n<script type=\"text/javascript\">document.write('This *should not* be interpreted as markdown');</script>\n"
246−,Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "simple",Space,Str "block",Str ":"]
246+,Para [Str "Here\8217s",Space,Str "a",Space,Str "simple",Space,Str "block",Str ":"]
247247,RawBlock "html" "<div>\n "
248248,Plain [Str "foo"]
249249,RawBlock "html" "</div>\n"
@@ -265,7 +265,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
265265,RawBlock "html" "<!-- foo --> \n"
266266,Para [Str "Code",Str ":"]
267267,CodeBlock ("",[],[]) "<hr />"
268−,Para [Str "Hr",Apostrophe,Str "s",Str ":"]
268+,Para [Str "Hr\8217s",Str ":"]
269269,RawBlock "html" "<hr>\n\n<hr />\n\n<hr />\n\n<hr> \n\n<hr /> \n\n<hr /> \n\n<hr class=\"foo\" id=\"bar\" />\n\n<hr class=\"foo\" id=\"bar\" />\n\n<hr class=\"foo\" id=\"bar\">\n"
270270,HorizontalRule
271271,Header 1 [Str "Inline",Space,Str "Markup"]
@@ -286,11 +286,11 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
286286,Para [Quoted DoubleQuote [Str "Hello",Str ","],Space,Str "said",Space,Str "the",Space,Str "spider",Str ".",Space,Quoted DoubleQuote [Quoted SingleQuote [Str "Shelob"],Space,Str "is",Space,Str "my",Space,Str "name",Str "."]]
287287,Para [Quoted SingleQuote [Str "A"],Str ",",Space,Quoted SingleQuote [Str "B"],Str ",",Space,Str "and",Space,Quoted SingleQuote [Str "C"],Space,Str "are",Space,Str "letters",Str "."]
288288,Para [Quoted SingleQuote [Str "Oak",Str ","],Space,Quoted SingleQuote [Str "elm",Str ","],Space,Str "and",Space,Quoted SingleQuote [Str "beech"],Space,Str "are",Space,Str "names",Space,Str "of",Space,Str "trees",Str ".",Space,Str "So",Space,Str "is",Space,Quoted SingleQuote [Str "pine",Str "."]]
289−,Para [Quoted SingleQuote [Str "He",Space,Str "said",Str ",",Space,Quoted DoubleQuote [Str "I",Space,Str "want",Space,Str "to",Space,Str "go",Str "."]],Space,Str "Were",Space,Str "you",Space,Str "alive",Space,Str "in",Space,Str "the",Space,Str "70",Apostrophe,Str "s",Str "?"]
289+,Para [Quoted SingleQuote [Str "He",Space,Str "said",Str ",",Space,Quoted DoubleQuote [Str "I",Space,Str "want",Space,Str "to",Space,Str "go",Str "."]],Space,Str "Were",Space,Str "you",Space,Str "alive",Space,Str "in",Space,Str "the",Space,Str "70\8217s",Str "?"]
290290,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "quoted",Space,Quoted SingleQuote [Code ("",[],[]) "code"],Space,Str "and",Space,Str "a",Space,Quoted DoubleQuote [Link [Str "quoted",Space,Str "link"] ("http://example.com/?foo=1&bar=2","")],Str "."]
291−,Para [Str "Some",Space,Str "dashes",Str ":",Space,Str "one",EmDash,Str "two",Space,EmDash,Space,Str "three",EmDash,Str "four",Space,EmDash,Space,Str "five",Str "."]
292−,Para [Str "Dashes",Space,Str "between",Space,Str "numbers",Str ":",Space,Str "5",EnDash,Str "7",Str ",",Space,Str "255",EnDash,Str "66",Str ",",Space,Str "1987",EnDash,Str "1999",Str "."]
293−,Para [Str "Ellipses",Ellipses,Str "and",Ellipses,Str "and",Ellipses,Str "."]
291+,Para [Str "Some",Space,Str "dashes",Str ":",Space,Str "one",Str "\8212",Str "two",Space,Str "\8212",Space,Str "three",Str "\8212",Str "four",Space,Str "\8212",Space,Str "five",Str "."]
292+,Para [Str "Dashes",Space,Str "between",Space,Str "numbers",Str ":",Space,Str "5",Str "\8211",Str "7",Str ",",Space,Str "255",Str "\8211",Str "66",Str ",",Space,Str "1987",Str "\8211",Str "1999",Str "."]
293+,Para [Str "Ellipses",Str "\8230",Str "and",Str "\8230",Str "and",Str "\8230",Str "."]
294294,HorizontalRule
295295,Header 1 [Str "LaTeX"]
296296,BulletList
@@ -300,15 +300,15 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
300300 ,[Plain [Math InlineMath "\\alpha \\wedge \\omega"]]
301301 ,[Plain [Math InlineMath "223"]]
302302 ,[Plain [Math InlineMath "p",Str "-",Str "Tree"]]
303− ,[Plain [Str "Here",Apostrophe,Str "s",Space,Str "some",Space,Str "display",Space,Str "math",Str ":",Space,Math DisplayMath "\\frac{d}{dx}f(x)=\\lim_{h\\to 0}\\frac{f(x+h)-f(x)}{h}"]]
304− ,[Plain [Str "Here",Apostrophe,Str "s",Space,Str "one",Space,Str "that",Space,Str "has",Space,Str "a",Space,Str "line",Space,Str "break",Space,Str "in",Space,Str "it",Str ":",Space,Math InlineMath "\\alpha + \\omega \\times x^2",Str "."]]]
305−,Para [Str "These",Space,Str "shouldn",Apostrophe,Str "t",Space,Str "be",Space,Str "math",Str ":"]
303+ ,[Plain [Str "Here\8217s",Space,Str "some",Space,Str "display",Space,Str "math",Str ":",Space,Math DisplayMath "\\frac{d}{dx}f(x)=\\lim_{h\\to 0}\\frac{f(x+h)-f(x)}{h}"]]
304+ ,[Plain [Str "Here\8217s",Space,Str "one",Space,Str "that",Space,Str "has",Space,Str "a",Space,Str "line",Space,Str "break",Space,Str "in",Space,Str "it",Str ":",Space,Math InlineMath "\\alpha + \\omega \\times x^2",Str "."]]]
305+,Para [Str "These",Space,Str "shouldn\8217t",Space,Str "be",Space,Str "math",Str ":"]
306306,BulletList
307307 [[Plain [Str "To",Space,Str "get",Space,Str "the",Space,Str "famous",Space,Str "equation",Str ",",Space,Str "write",Space,Code ("",[],[]) "$e = mc^2$",Str "."]]
308308 ,[Plain [Str "$",Str "22",Str ",",Str "000",Space,Str "is",Space,Str "a",Space,Emph [Str "lot"],Space,Str "of",Space,Str "money",Str ".",Space,Str "So",Space,Str "is",Space,Str "$",Str "34",Str ",",Str "000",Str ".",Space,Str "(",Str "It",Space,Str "worked",Space,Str "if",Space,Quoted DoubleQuote [Str "lot"],Space,Str "is",Space,Str "emphasized",Str ".",Str ")"]]
309309 ,[Plain [Str "Shoes",Space,Str "(",Str "$",Str "20",Str ")",Space,Str "and",Space,Str "socks",Space,Str "(",Str "$",Str "5",Str ")",Str "."]]
310310 ,[Plain [Str "Escaped",Space,Code ("",[],[]) "$",Str ":",Space,Str "$",Str "73",Space,Emph [Str "this",Space,Str "should",Space,Str "be",Space,Str "emphasized"],Space,Str "23",Str "$",Str "."]]]
311−,Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "LaTeX",Space,Str "table",Str ":"]
311+,Para [Str "Here\8217s",Space,Str "a",Space,Str "LaTeX",Space,Str "table",Str ":"]
312312,RawBlock "latex" "\\begin{tabular}{|l|l|}\\hline\nAnimal & Number \\\\ \\hline\nDog & 2 \\\\\nCat & 1 \\\\ \\hline\n\\end{tabular}"
313313,HorizontalRule
314314,Header 1 [Str "Special",Space,Str "Characters"]
@@ -366,10 +366,10 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
366366,Para [Str "Foo",Space,Link [Str "bar"] ("/url/","Title with \"quotes\" inside"),Str "."]
367367,Para [Str "Foo",Space,Link [Str "biz"] ("/url/","Title with \"quote\" inside"),Str "."]
368368,Header 2 [Str "With",Space,Str "ampersands"]
369−,Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Link [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."]
370−,Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text",Str ":",Space,Link [Str "AT",Str "&",Str "T"] ("http://att.com/","AT&T"),Str "."]
371−,Para [Str "Here",Apostrophe,Str "s",Space,Str "an",Space,Link [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."]
372−,Para [Str "Here",Apostrophe,Str "s",Space,Str "an",Space,Link [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] ("/script?foo=1&bar=2",""),Str "."]
369+,Para [Str "Here\8217s",Space,Str "a",Space,Link [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."]
370+,Para [Str "Here\8217s",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text",Str ":",Space,Link [Str "AT",Str "&",Str "T"] ("http://att.com/","AT&T"),Str "."]
371+,Para [Str "Here\8217s",Space,Str "an",Space,Link [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."]
372+,Para [Str "Here\8217s",Space,Str "an",Space,Link [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] ("/script?foo=1&bar=2",""),Str "."]
373373,Header 2 [Str "Autolinks"]
374374,Para [Str "With",Space,Str "an",Space,Str "ampersand",Str ":",Space,Link [Code ("",["url"],[]) "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")]
375375,BulletList
@@ -388,7 +388,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
388388,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "movie"] ("movie.jpg",""),Space,Str "icon",Str "."]
389389,HorizontalRule
390390,Header 1 [Str "Footnotes"]
391−,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference",Str ",",Note [Para [Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote",Str ".",Space,Str "It",Space,Str "can",Space,Str "go",Space,Str "anywhere",Space,Str "after",Space,Str "the",Space,Str "footnote",Space,Str "reference",Str ".",Space,Str "It",Space,Str "need",Space,Str "not",Space,Str "be",Space,Str "placed",Space,Str "at",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "document",Str "."]],Space,Str "and",Space,Str "another",Str ".",Note [Para [Str "Here",Apostrophe,Str "s",Space,Str "the",Space,Str "long",Space,Str "note",Str ".",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",Space,Str "blocks",Str "."],Para [Str "Subsequent",Space,Str "blocks",Space,Str "are",Space,Str "indented",Space,Str "to",Space,Str "show",Space,Str "that",Space,Str "they",Space,Str "belong",Space,Str "to",Space,Str "the",Space,Str "footnote",Space,Str "(",Str "as",Space,Str "with",Space,Str "list",Space,Str "items",Str ")",Str "."],CodeBlock ("",[],[]) " { <code> }",Para [Str "If",Space,Str "you",Space,Str "want",Str ",",Space,Str "you",Space,Str "can",Space,Str "indent",Space,Str "every",Space,Str "line",Str ",",Space,Str "but",Space,Str "you",Space,Str "can",Space,Str "also",Space,Str "be",Space,Str "lazy",Space,Str "and",Space,Str "just",Space,Str "indent",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "each",Space,Str "block",Str "."]],Space,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference",Str ",",Space,Str "because",Space,Str "it",Space,Str "contains",Space,Str "a",Space,Str "space",Str ".",Str "[",Str "^",Str "my",Space,Str "note",Str "]",Space,Str "Here",Space,Str "is",Space,Str "an",Space,Str "inline",Space,Str "note",Str ".",Note [Para [Str "This",Space,Str "is",Space,Emph [Str "easier"],Space,Str "to",Space,Str "type",Str ".",Space,Str "Inline",Space,Str "notes",Space,Str "may",Space,Str "contain",Space,Link [Str "links"] ("http://google.com",""),Space,Str "and",Space,Code ("",[],[]) "]",Space,Str "verbatim",Space,Str "characters",Str ",",Space,Str "as",Space,Str "well",Space,Str "as",Space,Str "[",Str "bracketed",Space,Str "text",Str "]",Str "."]]]
391+,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference",Str ",",Note [Para [Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote",Str ".",Space,Str "It",Space,Str "can",Space,Str "go",Space,Str "anywhere",Space,Str "after",Space,Str "the",Space,Str "footnote",Space,Str "reference",Str ".",Space,Str "It",Space,Str "need",Space,Str "not",Space,Str "be",Space,Str "placed",Space,Str "at",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "document",Str "."]],Space,Str "and",Space,Str "another",Str ".",Note [Para [Str "Here\8217s",Space,Str "the",Space,Str "long",Space,Str "note",Str ".",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",Space,Str "blocks",Str "."],Para [Str "Subsequent",Space,Str "blocks",Space,Str "are",Space,Str "indented",Space,Str "to",Space,Str "show",Space,Str "that",Space,Str "they",Space,Str "belong",Space,Str "to",Space,Str "the",Space,Str "footnote",Space,Str "(",Str "as",Space,Str "with",Space,Str "list",Space,Str "items",Str ")",Str "."],CodeBlock ("",[],[]) " { <code> }",Para [Str "If",Space,Str "you",Space,Str "want",Str ",",Space,Str "you",Space,Str "can",Space,Str "indent",Space,Str "every",Space,Str "line",Str ",",Space,Str "but",Space,Str "you",Space,Str "can",Space,Str "also",Space,Str "be",Space,Str "lazy",Space,Str "and",Space,Str "just",Space,Str "indent",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "each",Space,Str "block",Str "."]],Space,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference",Str ",",Space,Str "because",Space,Str "it",Space,Str "contains",Space,Str "a",Space,Str "space",Str ".",Str "[",Str "^",Str "my",Space,Str "note",Str "]",Space,Str "Here",Space,Str "is",Space,Str "an",Space,Str "inline",Space,Str "note",Str ".",Note [Para [Str "This",Space,Str "is",Space,Emph [Str "easier"],Space,Str "to",Space,Str "type",Str ".",Space,Str "Inline",Space,Str "notes",Space,Str "may",Space,Str "contain",Space,Link [Str "links"] ("http://google.com",""),Space,Str "and",Space,Code ("",[],[]) "]",Space,Str "verbatim",Space,Str "characters",Str ",",Space,Str "as",Space,Str "well",Space,Str "as",Space,Str "[",Str "bracketed",Space,Str "text",Str "]",Str "."]]]
392392,BlockQuote
393393 [Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes",Str ".",Note [Para [Str "In",Space,Str "quote",Str "."]]]]
394394,OrderedList (1,Decimal,Period)
tests/textile-reader.native+8−8
@@ -1,5 +1,5 @@
11Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
2−[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc",Space,Str "Textile",Space,Str "Reader",Str ".",Space,Str "Part",Space,Str "of",Space,Str "it",Space,Str "comes",LineBreak,Str "from",Space,Str "John",Space,Str "Gruber",Apostrophe,Str "s",Space,Str "markdown",Space,Str "test",Space,Str "suite",Str "."]
2+[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc",Space,Str "Textile",Space,Str "Reader",Str ".",Space,Str "Part",Space,Str "of",Space,Str "it",Space,Str "comes",LineBreak,Str "from",Space,Str "John",Space,Str "Gruber",Str "\8217",Str "s",Space,Str "markdown",Space,Str "test",Space,Str "suite",Str "."]
33,HorizontalRule
44,Header 1 [Str "Headers"]
55,Header 2 [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link [Str "embeded",Space,Str "link"] ("http://www.example.com","")]
@@ -8,9 +8,9 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
88,Header 5 [Str "Level",Space,Str "5"]
99,Header 6 [Str "Level",Space,Str "6"]
1010,Header 1 [Str "Paragraphs"]
11−,Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "regular",Space,Str "paragraph",Str "."]
11+,Para [Str "Here",Str "\8217",Str "s",Space,Str "a",Space,Str "regular",Space,Str "paragraph",Str "."]
1212,Para [Str "Line",Space,Str "breaks",Space,Str "are",Space,Str "preserved",Space,Str "in",Space,Str "textile",Str ",",Space,Str "so",Space,Str "you",Space,Str "can",Space,Str "not",Space,Str "wrap",Space,Str "your",Space,Str "very",LineBreak,Str "long",Space,Str "paragraph",Space,Str "with",Space,Str "your",Space,Str "favourite",Space,Str "text",Space,Str "editor",Space,Str "and",Space,Str "have",Space,Str "it",Space,Str "rendered",LineBreak,Str "with",Space,Str "no",Space,Str "break",Str "."]
13−,Para [Str "Here",Apostrophe,Str "s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet",Str "."]
13+,Para [Str "Here",Str "\8217",Str "s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet",Str "."]
1414,BulletList
1515 [[Plain [Str "criminey",Str "."]]]
1616,Para [Str "There",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "paragraph",Space,Str "break",Space,Str "between",Space,Str "here"]
@@ -70,9 +70,9 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
7070,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ",",Space,Str "and",Space,Str "so",Space,Emph [Str "is",Space,Str "this"],Str ".",LineBreak,Str "This",Space,Str "is",Space,Strong [Str "strong"],Str ",",Space,Str "and",Space,Str "so",Space,Strong [Str "is",Space,Str "this"],Str ".",LineBreak,Str "A",Space,Link [Strong [Str "strong",Space,Str "link"]] ("http://www.foobar.com",""),Str "."]
7171,Para [Emph [Strong [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em",Str "."]],LineBreak,Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word",Space,Str "and",Space,Emph [Strong [Str "that",Space,Str "one"]],Str ".",LineBreak,Strikeout [Str "This",Space,Str "is",Space,Str "strikeout",Space,Str "and",Space,Strong [Str "strong"]]]
7272,Para [Str "Superscripts",Str ":",Space,Str "a",Superscript [Str "bc"],Str "d",Space,Str "a",Superscript [Strong [Str "hello"]],Space,Str "a",Superscript [Str "hello",Space,Str "there"],Str ".",LineBreak,Str "Subscripts",Str ":",Space,Str "H",Subscript [Str "2"],Str "O",Str ",",Space,Str "H",Subscript [Str "23"],Str "O",Str ",",Space,Str "H",Subscript [Str "many",Space,Str "of",Space,Str "them"],Str "O",Str "."]
73−,Para [Str "Dashes",Space,Str ":",Space,Str "How",Space,Str "cool",Space,EmDash,Space,Str "automatic",Space,Str "dashes",Str "."]
74−,Para [Str "Elipses",Space,Str ":",Space,Str "He",Space,Str "thought",Space,Str "and",Space,Str "thought",Space,Ellipses,Space,Str "and",Space,Str "then",Space,Str "thought",Space,Str "some",Space,Str "more",Str "."]
75−,Para [Str "Quotes",Space,Str "and",Space,Str "apostrophes",Space,Str ":",Space,Quoted DoubleQuote [Str "I",Apostrophe,Str "d",Space,Str "like",Space,Str "to",Space,Str "thank",Space,Str "you"],Space,Str "for",Space,Str "example",Str "."]
73+,Para [Str "Dashes",Space,Str ":",Space,Str "How",Space,Str "cool",Space,Str "\8212",Space,Str "automatic",Space,Str "dashes",Str "."]
74+,Para [Str "Elipses",Space,Str ":",Space,Str "He",Space,Str "thought",Space,Str "and",Space,Str "thought",Space,Str "\8230",Space,Str "and",Space,Str "then",Space,Str "thought",Space,Str "some",Space,Str "more",Str "."]
75+,Para [Str "Quotes",Space,Str "and",Space,Str "apostrophes",Space,Str ":",Space,Quoted DoubleQuote [Str "I",Str "\8217",Str "d",Space,Str "like",Space,Str "to",Space,Str "thank",Space,Str "you"],Space,Str "for",Space,Str "example",Str "."]
7676,Header 1 [Str "Links"]
7777,Header 2 [Str "Explicit"]
7878,Para [Str "Just",Space,Str "a",Space,Link [Str "url"] ("http://www.url.com","")]
@@ -96,7 +96,7 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
9696 ,[[Plain [Str "bella"]]
9797 ,[Plain [Str "45"]]
9898 ,[Plain [Str "f"]]]]
99−,Para [Str "and",Space,Str "some",Space,Str "text",Space,Str "following",Space,Ellipses]
99+,Para [Str "and",Space,Str "some",Space,Str "text",Space,Str "following",Space,Str "\8230"]
100100,Header 2 [Str "With",Space,Str "headers"]
101101,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0]
102102 [[Plain [Str "name"]]
@@ -136,7 +136,7 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
136136,RawBlock "html" "</div>"
137137,Para [Str "as",Space,Str "well",Str "."]
138138,BulletList
139− [[Plain [Str "this",Space,Str "<",Str "div",Str ">",Space,Str "won",Apostrophe,Str "t",Space,Str "produce",Space,Str "raw",Space,Str "html",Space,Str "blocks",Space,Str "<",Str "/div",Str ">"]]
139+ [[Plain [Str "this",Space,Str "<",Str "div",Str ">",Space,Str "won",Str "\8217",Str "t",Space,Str "produce",Space,Str "raw",Space,Str "html",Space,Str "blocks",Space,Str "<",Str "/div",Str ">"]]
140140 ,[Plain [Str "but",Space,Str "this",Space,RawInline "html" "<strong>",Space,Str "will",Space,Str "produce",Space,Str "inline",Space,Str "html",Space,RawInline "html" "</strong>"]]]
141141,Para [Str "Can",Space,Str "you",Space,Str "prove",Space,Str "that",Space,Str "2",Space,Str "<",Space,Str "3",Space,Str "?"]
142142,Header 1 [Str "Acronyms",Space,Str "and",Space,Str "marks"]
tests/writer.docbook+17−17
@@ -16,7 +16,7 @@
1616 </articleinfo>
1717<para>
1818 This is a set of tests for pandoc. Most of them are adapted from John
19− Gruber's markdown test suite.
19+ Gruber’s markdown test suite.
2020</para>
2121<section id="headers">
2222 <title>Headers</title>
@@ -56,7 +56,7 @@
5656<section id="paragraphs">
5757 <title>Paragraphs</title>
5858 <para>
59− Here's a regular paragraph.
59+ Here’s a regular paragraph.
6060 </para>
6161 <para>
6262 In Markdown 1.0.0 and earlier. Version 8. This line turns into a list
@@ -64,7 +64,7 @@
6464 a list item.
6565 </para>
6666 <para>
67− Here's one with a bullet. * criminey.
67+ Here’s one with a bullet. * criminey.
6868 </para>
6969 <para>
7070 There should be a hard line break<literallayout></literallayout>here.
@@ -364,7 +364,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
364364 Item 1, graf one.
365365 </para>
366366 <para>
367− Item 1. graf two. The quick brown fox jumped over the lazy dog's
367+ Item 1. graf two. The quick brown fox jumped over the lazy dog’s
368368 back.
369369 </para>
370370 </listitem>
@@ -404,7 +404,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
404404 </listitem>
405405 </itemizedlist>
406406 <para>
407− Here's another:
407+ Here’s another:
408408 </para>
409409 <orderedlist numeration="arabic">
410410 <listitem>
@@ -893,7 +893,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
893893
894894 <script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>
895895 <para>
896− Here's a simple block:
896+ Here’s a simple block:
897897 </para>
898898 <div>
899899
@@ -956,7 +956,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
956956&lt;hr /&gt;
957957</programlisting>
958958 <para>
959− Hr's:
959+ Hr’s:
960960 </para>
961961 <hr>
962962
@@ -1041,7 +1041,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
10411041 </para>
10421042 <para>
10431043 <quote>He said, <quote>I want to go.</quote></quote> Were you alive in the
1044− 70's?
1044+ 70’s?
10451045 </para>
10461046 <para>
10471047 Here is some quoted <quote><literal>code</literal></quote> and a
@@ -1092,19 +1092,19 @@ These should not be escaped: \$ \\ \&gt; \[ \{
10921092 </listitem>
10931093 <listitem>
10941094 <para>
1095− Here's some display math:
1095+ Here’s some display math:
10961096 $\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$
10971097 </para>
10981098 </listitem>
10991099 <listitem>
11001100 <para>
1101− Here's one that has a line break in it:
1101+ Here’s one that has a line break in it:
11021102 <emphasis>α</emphasis> + <emphasis>ω</emphasis> × <emphasis>x</emphasis><superscript>2</superscript>.
11031103 </para>
11041104 </listitem>
11051105 </itemizedlist>
11061106 <para>
1107− These shouldn't be math:
1107+ These shouldn’t be math:
11081108 </para>
11091109 <itemizedlist>
11101110 <listitem>
@@ -1131,7 +1131,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
11311131 </listitem>
11321132 </itemizedlist>
11331133 <para>
1134− Here's a LaTeX table:
1134+ Here’s a LaTeX table:
11351135 </para>
11361136</section>
11371137<section id="special-characters">
@@ -1304,18 +1304,18 @@ These should not be escaped: \$ \\ \&gt; \[ \{
13041304 <section id="with-ampersands">
13051305 <title>With ampersands</title>
13061306 <para>
1307− Here's a <ulink url="http://example.com/?foo=1&amp;bar=2">link with an
1307+ Here’s a <ulink url="http://example.com/?foo=1&amp;bar=2">link with an
13081308 ampersand in the URL</ulink>.
13091309 </para>
13101310 <para>
1311− Here's a link with an amersand in the link text:
1311+ Here’s a link with an amersand in the link text:
13121312 <ulink url="http://att.com/">AT&amp;T</ulink>.
13131313 </para>
13141314 <para>
1315− Here's an <ulink url="/script?foo=1&amp;bar=2">inline link</ulink>.
1315+ Here’s an <ulink url="/script?foo=1&amp;bar=2">inline link</ulink>.
13161316 </para>
13171317 <para>
1318− Here's an <ulink url="/script?foo=1&amp;bar=2">inline link in pointy
1318+ Here’s an <ulink url="/script?foo=1&amp;bar=2">inline link in pointy
13191319 braces</ulink>.
13201320 </para>
13211321 </section>
@@ -1392,7 +1392,7 @@ or here: &lt;http://example.com/&gt;
13921392 </para>
13931393 </footnote> and another.<footnote>
13941394 <para>
1395− Here's the long note. This one contains multiple blocks.
1395+ Here’s the long note. This one contains multiple blocks.
13961396 </para>
13971397 <para>
13981398 Subsequent blocks are indented to show that they belong to the
tests/writer.mediawiki+26−26
@@ -1,4 +1,4 @@
1−This is a set of tests for pandoc. Most of them are adapted from John Gruber&rsquo;s markdown test suite.
1+This is a set of tests for pandoc. Most of them are adapted from John Gruber’s markdown test suite.
22
33
44-----
@@ -30,11 +30,11 @@ with no blank line
3030
3131= Paragraphs =
3232
33−Here&rsquo;s a regular paragraph.
33+Here’s a regular paragraph.
3434
3535In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item.
3636
37−Here&rsquo;s one with a bullet. * criminey.
37+Here’s one with a bullet. * criminey.
3838
3939There should be a hard line break<br />
4040here.
@@ -160,7 +160,7 @@ Multiple paragraphs:
160160
161161<ol style="list-style-type: decimal;">
162162<li><p>Item 1, graf one.</p>
163−<p>Item 1. graf two. The quick brown fox jumped over the lazy dog&rsquo;s back.</p></li>
163+<p>Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.</p></li>
164164<li><p>Item 2.</p></li>
165165<li><p>Item 3.</p></li></ol>
166166
@@ -172,7 +172,7 @@ Multiple paragraphs:
172172
173173
174174
175−Here&rsquo;s another:
175+Here’s another:
176176
177177# First
178178# Second:
@@ -350,7 +350,7 @@ And this is '''strong'''
350350
351351<script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>
352352
353−Here&rsquo;s a simple block:
353+Here’s a simple block:
354354
355355<div>
356356
@@ -401,7 +401,7 @@ Just plain comment, with trailing spaces on the line:
401401Code:
402402
403403<pre>&lt;hr /&gt;</pre>
404−Hr&rsquo;s:
404+Hr’s:
405405
406406<hr>
407407
@@ -455,21 +455,21 @@ These should not be superscripts or subscripts, because of the unescaped spaces:
455455
456456= Smart quotes, ellipses, dashes =
457457
458−&ldquo;Hello,&rdquo; said the spider. &ldquo;&lsquo;Shelob&rsquo; is my name.&rdquo;
458+“Hello,” said the spider. “‘Shelob’ is my name.”
459459
460−&lsquo;A&rsquo;, &lsquo;B&rsquo;, and &lsquo;C&rsquo; are letters.
460+‘A’, ‘B’, and ‘C’ are letters.
461461
462−&lsquo;Oak,&rsquo; &lsquo;elm,&rsquo; and &lsquo;beech&rsquo; are names of trees. So is &lsquo;pine.&rsquo;
462+‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’
463463
464−&lsquo;He said, &ldquo;I want to go.&rdquo;&rsquo; Were you alive in the 70&rsquo;s?
464+‘He said, “I want to go.”’ Were you alive in the 70’s?
465465
466−Here is some quoted &lsquo;<tt>code</tt>&rsquo; and a &ldquo;[http://example.com/?foo=1&bar=2 quoted link]&rdquo;.
466+Here is some quoted ‘<tt>code</tt>’ and a “[http://example.com/?foo=1&bar=2 quoted link]”.
467467
468−Some dashes: one&mdash;two &mdash; three&mdash;four &mdash; five.
468+Some dashes: one—two — three—four — five.
469469
470−Dashes between numbers: 5&ndash;7, 255&ndash;66, 1987&ndash;1999.
470+Dashes between numbers: 5–7, 255–66, 1987–1999.
471471
472−Ellipses&hellip;and&hellip;and&hellip;.
472+Ellipses…and…and….
473473
474474
475475-----
@@ -482,17 +482,17 @@ Ellipses&hellip;and&hellip;and&hellip;.
482482* <math>\alpha \wedge \omega</math>
483483* <math>223</math>
484484* <math>p</math>-Tree
485−* Here&rsquo;s some display math: <math>\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}</math>
486−* Here&rsquo;s one that has a line break in it: <math>\alpha + \omega \times x^2</math>.
485+* Here’s some display math: <math>\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}</math>
486+* Here’s one that has a line break in it: <math>\alpha + \omega \times x^2</math>.
487487
488−These shouldn&rsquo;t be math:
488+These shouldn’t be math:
489489
490490* To get the famous equation, write <tt>$e = mc^2$</tt>.
491−* $22,000 is a ''lot'' of money. So is $34,000. (It worked if &ldquo;lot&rdquo; is emphasized.)
491+* $22,000 is a ''lot'' of money. So is $34,000. (It worked if “lot” is emphasized.)
492492* Shoes ($20) and socks ($5).
493493* Escaped <tt>$</tt>: $73 ''this should be emphasized'' 23$.
494494
495−Here&rsquo;s a LaTeX table:
495+Here’s a LaTeX table:
496496
497497
498498
@@ -602,13 +602,13 @@ Foo [[url/|biz]].
602602
603603== With ampersands ==
604604
605−Here&rsquo;s a [http://example.com/?foo=1&bar=2 link with an ampersand in the URL].
605+Here’s a [http://example.com/?foo=1&bar=2 link with an ampersand in the URL].
606606
607−Here&rsquo;s a link with an amersand in the link text: [http://att.com/ AT&amp;T].
607+Here’s a link with an amersand in the link text: [http://att.com/ AT&amp;T].
608608
609−Here&rsquo;s an [[script?foo=1&bar=2|inline link]].
609+Here’s an [[script?foo=1&bar=2|inline link]].
610610
611−Here&rsquo;s an [[script?foo=1&bar=2|inline link in pointy braces]].
611+Here’s an [[script?foo=1&bar=2|inline link in pointy braces]].
612612
613613== Autolinks ==
614614
@@ -630,7 +630,7 @@ Auto-links should not occur here: <tt>&lt;http://example.com/&gt;</tt>
630630
631631= Images =
632632
633−From &ldquo;Voyage dans la Lune&rdquo; by Georges Melies (1902):
633+From “Voyage dans la Lune” by Georges Melies (1902):
634634
635635[[Image:lalune.jpg|frame|none|alt=Voyage dans la Lune|caption lalune]]
636636
@@ -642,7 +642,7 @@ Here is a movie [[Image:movie.jpg|movie]] icon.
642642= Footnotes =
643643
644644Here is a footnote reference,<ref>Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.
645−</ref> and another.<ref>Here&rsquo;s the long note. This one contains multiple blocks.
645+</ref> and another.<ref>Here’s the long note. This one contains multiple blocks.
646646
647647Subsequent blocks are indented to show that they belong to the footnote (as with list items).
648648
tests/writer.native+20−20
@@ -1,5 +1,5 @@
11Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docAuthors = [[Str "John",Space,Str "MacFarlane"],[Str "Anonymous"]], docDate = [Str "July",Space,Str "17",Str ",",Space,Str "2006"]})
2−[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc",Str ".",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",Space,Str "John",Space,Str "Gruber",Apostrophe,Str "s",Space,Str "markdown",Space,Str "test",Space,Str "suite",Str "."]
2+[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc",Str ".",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",Space,Str "John",Space,Str "Gruber\8217s",Space,Str "markdown",Space,Str "test",Space,Str "suite",Str "."]
33,HorizontalRule
44,Header 1 [Str "Headers"]
55,Header 2 [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link [Str "embedded",Space,Str "link"] ("/url","")]
@@ -14,9 +14,9 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
1414,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"]
1515,HorizontalRule
1616,Header 1 [Str "Paragraphs"]
17−,Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "regular",Space,Str "paragraph",Str "."]
17+,Para [Str "Here\8217s",Space,Str "a",Space,Str "regular",Space,Str "paragraph",Str "."]
1818,Para [Str "In",Space,Str "Markdown",Space,Str "1",Str ".",Str "0",Str ".",Str "0",Space,Str "and",Space,Str "earlier",Str ".",Space,Str "Version",Space,Str "8",Str ".",Space,Str "This",Space,Str "line",Space,Str "turns",Space,Str "into",Space,Str "a",Space,Str "list",Space,Str "item",Str ".",Space,Str "Because",Space,Str "a",Space,Str "hard",Str "-",Str "wrapped",Space,Str "line",Space,Str "in",Space,Str "the",Space,Str "middle",Space,Str "of",Space,Str "a",Space,Str "paragraph",Space,Str "looked",Space,Str "like",Space,Str "a",Space,Str "list",Space,Str "item",Str "."]
19−,Para [Str "Here",Apostrophe,Str "s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet",Str ".",Space,Str "*",Space,Str "criminey",Str "."]
19+,Para [Str "Here\8217s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet",Str ".",Space,Str "*",Space,Str "criminey",Str "."]
2020,Para [Str "There",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "hard",Space,Str "line",Space,Str "break",LineBreak,Str "here",Str "."]
2121,HorizontalRule
2222,Header 1 [Str "Block",Space,Str "Quotes"]
@@ -100,7 +100,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
100100,Para [Str "Multiple",Space,Str "paragraphs",Str ":"]
101101,OrderedList (1,Decimal,Period)
102102 [[Para [Str "Item",Space,Str "1",Str ",",Space,Str "graf",Space,Str "one",Str "."]
103− ,Para [Str "Item",Space,Str "1",Str ".",Space,Str "graf",Space,Str "two",Str ".",Space,Str "The",Space,Str "quick",Space,Str "brown",Space,Str "fox",Space,Str "jumped",Space,Str "over",Space,Str "the",Space,Str "lazy",Space,Str "dog",Apostrophe,Str "s",Space,Str "back",Str "."]]
103+ ,Para [Str "Item",Space,Str "1",Str ".",Space,Str "graf",Space,Str "two",Str ".",Space,Str "The",Space,Str "quick",Space,Str "brown",Space,Str "fox",Space,Str "jumped",Space,Str "over",Space,Str "the",Space,Str "lazy",Space,Str "dog\8217s",Space,Str "back",Str "."]]
104104 ,[Para [Str "Item",Space,Str "2",Str "."]]
105105 ,[Para [Str "Item",Space,Str "3",Str "."]]]
106106,Header 2 [Str "Nested"]
@@ -110,7 +110,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
110110 [[Plain [Str "Tab"]
111111 ,BulletList
112112 [[Plain [Str "Tab"]]]]]]]
113−,Para [Str "Here",Apostrophe,Str "s",Space,Str "another",Str ":"]
113+,Para [Str "Here\8217s",Space,Str "another",Str ":"]
114114,OrderedList (1,Decimal,Period)
115115 [[Plain [Str "First"]]
116116 ,[Plain [Str "Second",Str ":"]
@@ -243,7 +243,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
243243,RawBlock "html" "</td>\n<td>"
244244,Plain [Str "And",Space,Str "this",Space,Str "is",Space,Strong [Str "strong"]]
245245,RawBlock "html" "</td>\n</tr>\n</table>\n\n<script type=\"text/javascript\">document.write('This *should not* be interpreted as markdown');</script>\n"
246−,Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "simple",Space,Str "block",Str ":"]
246+,Para [Str "Here\8217s",Space,Str "a",Space,Str "simple",Space,Str "block",Str ":"]
247247,RawBlock "html" "<div>\n "
248248,Plain [Str "foo"]
249249,RawBlock "html" "</div>\n"
@@ -265,7 +265,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
265265,RawBlock "html" "<!-- foo --> \n"
266266,Para [Str "Code",Str ":"]
267267,CodeBlock ("",[],[]) "<hr />"
268−,Para [Str "Hr",Apostrophe,Str "s",Str ":"]
268+,Para [Str "Hr\8217s",Str ":"]
269269,RawBlock "html" "<hr>\n\n<hr />\n\n<hr />\n\n<hr> \n\n<hr /> \n\n<hr /> \n\n<hr class=\"foo\" id=\"bar\" />\n\n<hr class=\"foo\" id=\"bar\" />\n\n<hr class=\"foo\" id=\"bar\">\n"
270270,HorizontalRule
271271,Header 1 [Str "Inline",Space,Str "Markup"]
@@ -286,11 +286,11 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
286286,Para [Quoted DoubleQuote [Str "Hello",Str ","],Space,Str "said",Space,Str "the",Space,Str "spider",Str ".",Space,Quoted DoubleQuote [Quoted SingleQuote [Str "Shelob"],Space,Str "is",Space,Str "my",Space,Str "name",Str "."]]
287287,Para [Quoted SingleQuote [Str "A"],Str ",",Space,Quoted SingleQuote [Str "B"],Str ",",Space,Str "and",Space,Quoted SingleQuote [Str "C"],Space,Str "are",Space,Str "letters",Str "."]
288288,Para [Quoted SingleQuote [Str "Oak",Str ","],Space,Quoted SingleQuote [Str "elm",Str ","],Space,Str "and",Space,Quoted SingleQuote [Str "beech"],Space,Str "are",Space,Str "names",Space,Str "of",Space,Str "trees",Str ".",Space,Str "So",Space,Str "is",Space,Quoted SingleQuote [Str "pine",Str "."]]
289−,Para [Quoted SingleQuote [Str "He",Space,Str "said",Str ",",Space,Quoted DoubleQuote [Str "I",Space,Str "want",Space,Str "to",Space,Str "go",Str "."]],Space,Str "Were",Space,Str "you",Space,Str "alive",Space,Str "in",Space,Str "the",Space,Str "70",Apostrophe,Str "s",Str "?"]
289+,Para [Quoted SingleQuote [Str "He",Space,Str "said",Str ",",Space,Quoted DoubleQuote [Str "I",Space,Str "want",Space,Str "to",Space,Str "go",Str "."]],Space,Str "Were",Space,Str "you",Space,Str "alive",Space,Str "in",Space,Str "the",Space,Str "70\8217s",Str "?"]
290290,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "quoted",Space,Quoted SingleQuote [Code ("",[],[]) "code"],Space,Str "and",Space,Str "a",Space,Quoted DoubleQuote [Link [Str "quoted",Space,Str "link"] ("http://example.com/?foo=1&bar=2","")],Str "."]
291−,Para [Str "Some",Space,Str "dashes",Str ":",Space,Str "one",EmDash,Str "two",Space,EmDash,Space,Str "three",EmDash,Str "four",Space,EmDash,Space,Str "five",Str "."]
292−,Para [Str "Dashes",Space,Str "between",Space,Str "numbers",Str ":",Space,Str "5",EnDash,Str "7",Str ",",Space,Str "255",EnDash,Str "66",Str ",",Space,Str "1987",EnDash,Str "1999",Str "."]
293−,Para [Str "Ellipses",Ellipses,Str "and",Ellipses,Str "and",Ellipses,Str "."]
291+,Para [Str "Some",Space,Str "dashes",Str ":",Space,Str "one",Str "\8212",Str "two",Space,Str "\8212",Space,Str "three",Str "\8212",Str "four",Space,Str "\8212",Space,Str "five",Str "."]
292+,Para [Str "Dashes",Space,Str "between",Space,Str "numbers",Str ":",Space,Str "5",Str "\8211",Str "7",Str ",",Space,Str "255",Str "\8211",Str "66",Str ",",Space,Str "1987",Str "\8211",Str "1999",Str "."]
293+,Para [Str "Ellipses",Str "\8230",Str "and",Str "\8230",Str "and",Str "\8230",Str "."]
294294,HorizontalRule
295295,Header 1 [Str "LaTeX"]
296296,BulletList
@@ -300,15 +300,15 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
300300 ,[Plain [Math InlineMath "\\alpha \\wedge \\omega"]]
301301 ,[Plain [Math InlineMath "223"]]
302302 ,[Plain [Math InlineMath "p",Str "-",Str "Tree"]]
303− ,[Plain [Str "Here",Apostrophe,Str "s",Space,Str "some",Space,Str "display",Space,Str "math",Str ":",Space,Math DisplayMath "\\frac{d}{dx}f(x)=\\lim_{h\\to 0}\\frac{f(x+h)-f(x)}{h}"]]
304− ,[Plain [Str "Here",Apostrophe,Str "s",Space,Str "one",Space,Str "that",Space,Str "has",Space,Str "a",Space,Str "line",Space,Str "break",Space,Str "in",Space,Str "it",Str ":",Space,Math InlineMath "\\alpha + \\omega \\times x^2",Str "."]]]
305−,Para [Str "These",Space,Str "shouldn",Apostrophe,Str "t",Space,Str "be",Space,Str "math",Str ":"]
303+ ,[Plain [Str "Here\8217s",Space,Str "some",Space,Str "display",Space,Str "math",Str ":",Space,Math DisplayMath "\\frac{d}{dx}f(x)=\\lim_{h\\to 0}\\frac{f(x+h)-f(x)}{h}"]]
304+ ,[Plain [Str "Here\8217s",Space,Str "one",Space,Str "that",Space,Str "has",Space,Str "a",Space,Str "line",Space,Str "break",Space,Str "in",Space,Str "it",Str ":",Space,Math InlineMath "\\alpha + \\omega \\times x^2",Str "."]]]
305+,Para [Str "These",Space,Str "shouldn\8217t",Space,Str "be",Space,Str "math",Str ":"]
306306,BulletList
307307 [[Plain [Str "To",Space,Str "get",Space,Str "the",Space,Str "famous",Space,Str "equation",Str ",",Space,Str "write",Space,Code ("",[],[]) "$e = mc^2$",Str "."]]
308308 ,[Plain [Str "$",Str "22",Str ",",Str "000",Space,Str "is",Space,Str "a",Space,Emph [Str "lot"],Space,Str "of",Space,Str "money",Str ".",Space,Str "So",Space,Str "is",Space,Str "$",Str "34",Str ",",Str "000",Str ".",Space,Str "(",Str "It",Space,Str "worked",Space,Str "if",Space,Quoted DoubleQuote [Str "lot"],Space,Str "is",Space,Str "emphasized",Str ".",Str ")"]]
309309 ,[Plain [Str "Shoes",Space,Str "(",Str "$",Str "20",Str ")",Space,Str "and",Space,Str "socks",Space,Str "(",Str "$",Str "5",Str ")",Str "."]]
310310 ,[Plain [Str "Escaped",Space,Code ("",[],[]) "$",Str ":",Space,Str "$",Str "73",Space,Emph [Str "this",Space,Str "should",Space,Str "be",Space,Str "emphasized"],Space,Str "23",Str "$",Str "."]]]
311−,Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "LaTeX",Space,Str "table",Str ":"]
311+,Para [Str "Here\8217s",Space,Str "a",Space,Str "LaTeX",Space,Str "table",Str ":"]
312312,RawBlock "latex" "\\begin{tabular}{|l|l|}\\hline\nAnimal & Number \\\\ \\hline\nDog & 2 \\\\\nCat & 1 \\\\ \\hline\n\\end{tabular}"
313313,HorizontalRule
314314,Header 1 [Str "Special",Space,Str "Characters"]
@@ -366,10 +366,10 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
366366,Para [Str "Foo",Space,Link [Str "bar"] ("/url/","Title with \"quotes\" inside"),Str "."]
367367,Para [Str "Foo",Space,Link [Str "biz"] ("/url/","Title with \"quote\" inside"),Str "."]
368368,Header 2 [Str "With",Space,Str "ampersands"]
369−,Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Link [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."]
370−,Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text",Str ":",Space,Link [Str "AT",Str "&",Str "T"] ("http://att.com/","AT&T"),Str "."]
371−,Para [Str "Here",Apostrophe,Str "s",Space,Str "an",Space,Link [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."]
372−,Para [Str "Here",Apostrophe,Str "s",Space,Str "an",Space,Link [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] ("/script?foo=1&bar=2",""),Str "."]
369+,Para [Str "Here\8217s",Space,Str "a",Space,Link [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."]
370+,Para [Str "Here\8217s",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text",Str ":",Space,Link [Str "AT",Str "&",Str "T"] ("http://att.com/","AT&T"),Str "."]
371+,Para [Str "Here\8217s",Space,Str "an",Space,Link [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."]
372+,Para [Str "Here\8217s",Space,Str "an",Space,Link [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] ("/script?foo=1&bar=2",""),Str "."]
373373,Header 2 [Str "Autolinks"]
374374,Para [Str "With",Space,Str "an",Space,Str "ampersand",Str ":",Space,Link [Code ("",["url"],[]) "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")]
375375,BulletList
@@ -388,7 +388,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
388388,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "movie"] ("movie.jpg",""),Space,Str "icon",Str "."]
389389,HorizontalRule
390390,Header 1 [Str "Footnotes"]
391−,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference",Str ",",Note [Para [Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote",Str ".",Space,Str "It",Space,Str "can",Space,Str "go",Space,Str "anywhere",Space,Str "after",Space,Str "the",Space,Str "footnote",Space,Str "reference",Str ".",Space,Str "It",Space,Str "need",Space,Str "not",Space,Str "be",Space,Str "placed",Space,Str "at",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "document",Str "."]],Space,Str "and",Space,Str "another",Str ".",Note [Para [Str "Here",Apostrophe,Str "s",Space,Str "the",Space,Str "long",Space,Str "note",Str ".",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",Space,Str "blocks",Str "."],Para [Str "Subsequent",Space,Str "blocks",Space,Str "are",Space,Str "indented",Space,Str "to",Space,Str "show",Space,Str "that",Space,Str "they",Space,Str "belong",Space,Str "to",Space,Str "the",Space,Str "footnote",Space,Str "(",Str "as",Space,Str "with",Space,Str "list",Space,Str "items",Str ")",Str "."],CodeBlock ("",[],[]) " { <code> }",Para [Str "If",Space,Str "you",Space,Str "want",Str ",",Space,Str "you",Space,Str "can",Space,Str "indent",Space,Str "every",Space,Str "line",Str ",",Space,Str "but",Space,Str "you",Space,Str "can",Space,Str "also",Space,Str "be",Space,Str "lazy",Space,Str "and",Space,Str "just",Space,Str "indent",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "each",Space,Str "block",Str "."]],Space,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference",Str ",",Space,Str "because",Space,Str "it",Space,Str "contains",Space,Str "a",Space,Str "space",Str ".",Str "[",Str "^",Str "my",Space,Str "note",Str "]",Space,Str "Here",Space,Str "is",Space,Str "an",Space,Str "inline",Space,Str "note",Str ".",Note [Para [Str "This",Space,Str "is",Space,Emph [Str "easier"],Space,Str "to",Space,Str "type",Str ".",Space,Str "Inline",Space,Str "notes",Space,Str "may",Space,Str "contain",Space,Link [Str "links"] ("http://google.com",""),Space,Str "and",Space,Code ("",[],[]) "]",Space,Str "verbatim",Space,Str "characters",Str ",",Space,Str "as",Space,Str "well",Space,Str "as",Space,Str "[",Str "bracketed",Space,Str "text",Str "]",Str "."]]]
391+,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference",Str ",",Note [Para [Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote",Str ".",Space,Str "It",Space,Str "can",Space,Str "go",Space,Str "anywhere",Space,Str "after",Space,Str "the",Space,Str "footnote",Space,Str "reference",Str ".",Space,Str "It",Space,Str "need",Space,Str "not",Space,Str "be",Space,Str "placed",Space,Str "at",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "document",Str "."]],Space,Str "and",Space,Str "another",Str ".",Note [Para [Str "Here\8217s",Space,Str "the",Space,Str "long",Space,Str "note",Str ".",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",Space,Str "blocks",Str "."],Para [Str "Subsequent",Space,Str "blocks",Space,Str "are",Space,Str "indented",Space,Str "to",Space,Str "show",Space,Str "that",Space,Str "they",Space,Str "belong",Space,Str "to",Space,Str "the",Space,Str "footnote",Space,Str "(",Str "as",Space,Str "with",Space,Str "list",Space,Str "items",Str ")",Str "."],CodeBlock ("",[],[]) " { <code> }",Para [Str "If",Space,Str "you",Space,Str "want",Str ",",Space,Str "you",Space,Str "can",Space,Str "indent",Space,Str "every",Space,Str "line",Str ",",Space,Str "but",Space,Str "you",Space,Str "can",Space,Str "also",Space,Str "be",Space,Str "lazy",Space,Str "and",Space,Str "just",Space,Str "indent",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "each",Space,Str "block",Str "."]],Space,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference",Str ",",Space,Str "because",Space,Str "it",Space,Str "contains",Space,Str "a",Space,Str "space",Str ".",Str "[",Str "^",Str "my",Space,Str "note",Str "]",Space,Str "Here",Space,Str "is",Space,Str "an",Space,Str "inline",Space,Str "note",Str ".",Note [Para [Str "This",Space,Str "is",Space,Emph [Str "easier"],Space,Str "to",Space,Str "type",Str ".",Space,Str "Inline",Space,Str "notes",Space,Str "may",Space,Str "contain",Space,Link [Str "links"] ("http://google.com",""),Space,Str "and",Space,Code ("",[],[]) "]",Space,Str "verbatim",Space,Str "characters",Str ",",Space,Str "as",Space,Str "well",Space,Str "as",Space,Str "[",Str "bracketed",Space,Str "text",Str "]",Str "."]]]
392392,BlockQuote
393393 [Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes",Str ".",Note [Para [Str "In",Space,Str "quote",Str "."]]]]
394394,OrderedList (1,Decimal,Period)
tests/writer.opendocument+35−39
@@ -864,7 +864,7 @@
864864<text:p text:style-name="Author">Anonymous</text:p>
865865<text:p text:style-name="Date">July 17, 2006</text:p>
866866<text:p text:style-name="Text_20_body">This is a set of tests for pandoc. Most
867−of them are adapted from John Gruber&#8217;s markdown test suite.</text:p>
867+of them are adapted from John Gruber’s markdown test suite.</text:p>
868868<text:p text:style-name="Horizontal_20_Line" />
869869<text:h text:style-name="Heading_20_1" text:outline-level="1">Headers</text:h>
870870<text:h text:style-name="Heading_20_2" text:outline-level="2">Level 2 with an
@@ -883,12 +883,12 @@ link</text:span></text:a></text:h>
883883<text:p text:style-name="First_20_paragraph">with no blank line</text:p>
884884<text:p text:style-name="Horizontal_20_Line" />
885885<text:h text:style-name="Heading_20_1" text:outline-level="1">Paragraphs</text:h>
886−<text:p text:style-name="First_20_paragraph">Here&#8217;s a regular
886+<text:p text:style-name="First_20_paragraph">Here’s a regular
887887paragraph.</text:p>
888888<text:p text:style-name="Text_20_body">In Markdown 1.0.0 and earlier. Version
8898898. This line turns into a list item. Because a hard-wrapped line in the middle
890890of a paragraph looked like a list item.</text:p>
891−<text:p text:style-name="Text_20_body">Here&#8217;s one with a bullet. *
891+<text:p text:style-name="Text_20_body">Here’s one with a bullet. *
892892criminey.</text:p>
893893<text:p text:style-name="Text_20_body">There should be a hard line
894894break<text:line-break />here.</text:p>
@@ -1061,7 +1061,7 @@ Blocks</text:h>
10611061 <text:list-item>
10621062 <text:p text:style-name="P29">Item 1, graf one.</text:p>
10631063 <text:p text:style-name="P29">Item 1. graf two. The quick brown fox jumped
1064− over the lazy dog&#8217;s back.</text:p>
1064+ over the lazy dog’s back.</text:p>
10651065 </text:list-item>
10661066 <text:list-item>
10671067 <text:p text:style-name="P29">Item 2.</text:p>
@@ -1084,7 +1084,7 @@ Blocks</text:h>
10841084 </text:list>
10851085 </text:list-item>
10861086</text:list>
1087−<text:p text:style-name="First_20_paragraph">Here&#8217;s another:</text:p>
1087+<text:p text:style-name="First_20_paragraph">Here’s another:</text:p>
10881088<text:list text:style-name="L16">
10891089 <text:list-item>
10901090 <text:p text:style-name="P33">First</text:p>
@@ -1303,7 +1303,7 @@ table:</text:p>
13031303<text:span text:style-name="T5">emphasized</text:span></text:p>
13041304<text:p text:style-name="Text_20_body">And this is
13051305<text:span text:style-name="T6">strong</text:span></text:p>
1306−<text:p text:style-name="Text_20_body">Here&#8217;s a simple block:</text:p>
1306+<text:p text:style-name="Text_20_body">Here’s a simple block:</text:p>
13071307<text:p text:style-name="Text_20_body">foo</text:p>
13081308<text:p text:style-name="Text_20_body">This should be a code block,
13091309though:</text:p>
@@ -1323,7 +1323,7 @@ comment:</text:p>
13231323spaces on the line:</text:p>
13241324<text:p text:style-name="Text_20_body">Code:</text:p>
13251325<text:p text:style-name="P50">&lt;hr /&gt;</text:p>
1326−<text:p text:style-name="First_20_paragraph">Hr&#8217;s:</text:p>
1326+<text:p text:style-name="First_20_paragraph">Hr’s:</text:p>
13271327<text:p text:style-name="Horizontal_20_Line" />
13281328<text:h text:style-name="Heading_20_1" text:outline-level="1">Inline
13291329Markup</text:h>
@@ -1374,23 +1374,22 @@ subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.</text:p>
13741374<text:p text:style-name="Horizontal_20_Line" />
13751375<text:h text:style-name="Heading_20_1" text:outline-level="1">Smart quotes,
13761376ellipses, dashes</text:h>
1377−<text:p text:style-name="First_20_paragraph">&#8220;Hello,&#8221; said the
1378−spider. &#8220;&#8216;Shelob&#8217; is my name.&#8221;</text:p>
1379−<text:p text:style-name="Text_20_body">&#8216;A&#8217;, &#8216;B&#8217;, and
1380−&#8216;C&#8217; are letters.</text:p>
1381−<text:p text:style-name="Text_20_body">&#8216;Oak,&#8217; &#8216;elm,&#8217;
1382−and &#8216;beech&#8217; are names of trees. So is &#8216;pine.&#8217;</text:p>
1383−<text:p text:style-name="Text_20_body">&#8216;He said, &#8220;I want to
1384−go.&#8221;&#8217; Were you alive in the 70&#8217;s?</text:p>
1377+<text:p text:style-name="First_20_paragraph">“Hello,” said the spider.
1378+“‘Shelob’ is my name.”</text:p>
1379+<text:p text:style-name="Text_20_body">‘A’, ‘B’, and ‘C’ are letters.</text:p>
1380+<text:p text:style-name="Text_20_body">‘Oak,’ ‘elm,’ and ‘beech’ are names of
1381+trees. So is ‘pine.’</text:p>
1382+<text:p text:style-name="Text_20_body">‘He said, “I want to go.”’ Were you
1383+alive in the 70’s?</text:p>
13851384<text:p text:style-name="Text_20_body">Here is some quoted
1386−&#8216;<text:span text:style-name="Teletype">code</text:span>&#8217; and a
1387−&#8220;<text:a xlink:type="simple" xlink:href="http://example.com/?foo=1&amp;bar=2" office:name=""><text:span text:style-name="Definition">quoted
1388−link</text:span></text:a>&#8221;.</text:p>
1389−<text:p text:style-name="Text_20_body">Some dashes: one&#8212;two &#8212;
1390−three&#8212;four &#8212; five.</text:p>
1391−<text:p text:style-name="Text_20_body">Dashes between numbers: 5&#8211;7,
1392−255&#8211;66, 1987&#8211;1999.</text:p>
1393−<text:p text:style-name="Text_20_body">Ellipses&#8230;and&#8230;and&#8230;.</text:p>
1385+‘<text:span text:style-name="Teletype">code</text:span>’ and a
1386+“<text:a xlink:type="simple" xlink:href="http://example.com/?foo=1&amp;bar=2" office:name=""><text:span text:style-name="Definition">quoted
1387+link</text:span></text:a>”.</text:p>
1388+<text:p text:style-name="Text_20_body">Some dashes: one—two — three—four —
1389+five.</text:p>
1390+<text:p text:style-name="Text_20_body">Dashes between numbers: 5–7, 255–66,
1391+1987–1999.</text:p>
1392+<text:p text:style-name="Text_20_body">Ellipses…and…and….</text:p>
13941393<text:p text:style-name="Horizontal_20_Line" />
13951394<text:h text:style-name="Heading_20_1" text:outline-level="1">LaTeX</text:h>
13961395<text:list text:style-name="L26">
@@ -1413,17 +1412,15 @@ three&#8212;four &#8212; five.</text:p>
14131412 <text:p text:style-name="P51"><text:span text:style-name="T62">p</text:span>-Tree</text:p>
14141413 </text:list-item>
14151414 <text:list-item>
1416− <text:p text:style-name="P51">Here&#8217;s some display math:
1415+ <text:p text:style-name="P51">Here’s some display math:
14171416 $\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</text:p>
14181417 </text:list-item>
14191418 <text:list-item>
1420− <text:p text:style-name="P51">Here&#8217;s one that has a line break in
1421− it:
1419+ <text:p text:style-name="P51">Here’s one that has a line break in it:
14221420 <text:span text:style-name="T63">α</text:span> + <text:span text:style-name="T64">ω</text:span> × <text:span text:style-name="T65">x</text:span><text:span text:style-name="T66">2</text:span>.</text:p>
14231421 </text:list-item>
14241422</text:list>
1425−<text:p text:style-name="First_20_paragraph">These shouldn&#8217;t be
1426−math:</text:p>
1423+<text:p text:style-name="First_20_paragraph">These shouldn’t be math:</text:p>
14271424<text:list text:style-name="L27">
14281425 <text:list-item>
14291426 <text:p text:style-name="P52">To get the famous equation, write
@@ -1432,7 +1429,7 @@ math:</text:p>
14321429 <text:list-item>
14331430 <text:p text:style-name="P52">$22,000 is a
14341431 <text:span text:style-name="T67">lot</text:span> of money. So is $34,000.
1435− (It worked if &#8220;lot&#8221; is emphasized.)</text:p>
1432+ (It worked if “lot” is emphasized.)</text:p>
14361433 </text:list-item>
14371434 <text:list-item>
14381435 <text:p text:style-name="P52">Shoes ($20) and socks ($5).</text:p>
@@ -1447,8 +1444,7 @@ math:</text:p>
14471444 23$.</text:p>
14481445 </text:list-item>
14491446</text:list>
1450−<text:p text:style-name="First_20_paragraph">Here&#8217;s a LaTeX
1451−table:</text:p>
1447+<text:p text:style-name="First_20_paragraph">Here’s a LaTeX table:</text:p>
14521448<text:p text:style-name="Horizontal_20_Line" />
14531449<text:h text:style-name="Heading_20_1" text:outline-level="1">Special
14541450Characters</text:h>
@@ -1538,16 +1534,16 @@ by itself should be a link.</text:p>
15381534<text:a xlink:type="simple" xlink:href="/url/" office:name="Title with &quot;quote&quot; inside"><text:span text:style-name="Definition">biz</text:span></text:a>.</text:p>
15391535<text:h text:style-name="Heading_20_2" text:outline-level="2">With
15401536ampersands</text:h>
1541−<text:p text:style-name="First_20_paragraph">Here&#8217;s a
1537+<text:p text:style-name="First_20_paragraph">Here’s a
15421538<text:a xlink:type="simple" xlink:href="http://example.com/?foo=1&amp;bar=2" office:name=""><text:span text:style-name="Definition">link
15431539with an ampersand in the URL</text:span></text:a>.</text:p>
1544−<text:p text:style-name="Text_20_body">Here&#8217;s a link with an amersand in
1545−the link text:
1540+<text:p text:style-name="Text_20_body">Here’s a link with an amersand in the
1541+link text:
15461542<text:a xlink:type="simple" xlink:href="http://att.com/" office:name="AT&amp;T"><text:span text:style-name="Definition">AT&amp;T</text:span></text:a>.</text:p>
1547−<text:p text:style-name="Text_20_body">Here&#8217;s an
1543+<text:p text:style-name="Text_20_body">Here’s an
15481544<text:a xlink:type="simple" xlink:href="/script?foo=1&amp;bar=2" office:name=""><text:span text:style-name="Definition">inline
15491545link</text:span></text:a>.</text:p>
1550−<text:p text:style-name="Text_20_body">Here&#8217;s an
1546+<text:p text:style-name="Text_20_body">Here’s an
15511547<text:a xlink:type="simple" xlink:href="/script?foo=1&amp;bar=2" office:name=""><text:span text:style-name="Definition">inline
15521548link in pointy braces</text:span></text:a>.</text:p>
15531549<text:h text:style-name="Heading_20_2" text:outline-level="2">Autolinks</text:h>
@@ -1573,8 +1569,8 @@ link in pointy braces</text:span></text:a>.</text:p>
15731569<text:p text:style-name="P57">or here: &lt;http://example.com/&gt;</text:p>
15741570<text:p text:style-name="Horizontal_20_Line" />
15751571<text:h text:style-name="Heading_20_1" text:outline-level="1">Images</text:h>
1576−<text:p text:style-name="First_20_paragraph">From &#8220;Voyage dans la
1577−Lune&#8221; by Georges Melies (1902):</text:p>
1572+<text:p text:style-name="First_20_paragraph">From “Voyage dans la Lune” by
1573+Georges Melies (1902):</text:p>
15781574<text:p text:style-name="Text_20_body"><draw:frame><draw:image xlink:href="lalune.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" /></draw:frame></text:p>
15791575<text:p text:style-name="Text_20_body">Here is a movie
15801576<draw:frame><draw:image xlink:href="movie.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" /></draw:frame>
@@ -1586,7 +1582,7 @@ reference,<text:note text:id="ftn0" text:note-class="footnote"><text:note-citati
15861582is the footnote. It can go anywhere after the footnote reference. It need not
15871583be placed at the end of the document.</text:p></text:note-body></text:note>
15881584and
1589−another.<text:note text:id="ftn1" text:note-class="footnote"><text:note-citation>2</text:note-citation><text:note-body><text:p text:style-name="Footnote">Here&#8217;s
1585+another.<text:note text:id="ftn1" text:note-class="footnote"><text:note-citation>2</text:note-citation><text:note-body><text:p text:style-name="Footnote">Here’s
15901586the long note. This one contains multiple
15911587blocks.</text:p><text:p text:style-name="Footnote">Subsequent blocks are
15921588indented to show that they belong to the footnote (as with list