git.iko.soy/typeable/pandoc
on master help sign in
Add support for attributes in inline Code.
f8dca6cJohn MacFarlane
pandoc.cabal+2−2
@@ -211,7 +211,7 @@ Library
211 else
211 else
212 Build-depends: base >= 3 && < 4
212 Build-depends: base >= 3 && < 4
213 if flag(highlighting)
213 if flag(highlighting)
214− Build-depends: highlighting-kate >= 0.2.7.1 && < 0.2.9
214+ Build-depends: highlighting-kate >= 0.2.8.2 && < 0.2.9
215 cpp-options: -D_HIGHLIGHTING
215 cpp-options: -D_HIGHLIGHTING
216 if impl(ghc >= 6.12)
216 if impl(ghc >= 6.12)
217 Ghc-Options: -O2 -Wall -fno-warn-unused-do-bind
217 Ghc-Options: -O2 -Wall -fno-warn-unused-do-bind
@@ -295,7 +295,7 @@ Executable pandoc
295 else
295 else
296 Build-depends: base >= 3 && < 4
296 Build-depends: base >= 3 && < 4
297 if flag(highlighting)
297 if flag(highlighting)
298− Build-depends: highlighting-kate >= 0.2.7.1 && < 0.2.9
298+ Build-depends: highlighting-kate >= 0.2.8.2 && < 0.2.9
299 cpp-options: -D_HIGHLIGHTING
299 cpp-options: -D_HIGHLIGHTING
300 if impl(ghc >= 6.12)
300 if impl(ghc >= 6.12)
301 Ghc-Options: -O2 -Wall -fno-warn-unused-do-bind
301 Ghc-Options: -O2 -Wall -fno-warn-unused-do-bind
src/Text/Pandoc/Parsing.hs+1−1
@@ -664,7 +664,7 @@ toKey = Key . bottomUp lowercase
664 where lowercase :: Inline -> Inline
664 where lowercase :: Inline -> Inline
665 lowercase (Str xs) = Str (map toLower xs)
665 lowercase (Str xs) = Str (map toLower xs)
666 lowercase (Math t xs) = Math t (map toLower xs)
666 lowercase (Math t xs) = Math t (map toLower xs)
667− lowercase (Code xs) = Code (map toLower xs)
667+ lowercase (Code attr xs) = Code attr (map toLower xs)
668 lowercase (RawInline f xs) = RawInline f (map toLower xs)
668 lowercase (RawInline f xs) = RawInline f (map toLower xs)
669 lowercase LineBreak = Space
669 lowercase LineBreak = Space
670 lowercase x = x
670 lowercase x = x
src/Text/Pandoc/Readers/HTML.hs+6−2
@@ -338,9 +338,13 @@ pImage = do
338
338
339pCode :: TagParser [Inline]
339pCode :: TagParser [Inline]
340pCode = try $ do
340pCode = try $ do
341− (TagOpen open _) <- pSatisfy $ tagOpen (`elem` ["code","tt"]) (const True)
341+ (TagOpen open attr) <- pSatisfy $ tagOpen (`elem` ["code","tt"]) (const True)
342 result <- manyTill pAnyTag (pCloses open)
342 result <- manyTill pAnyTag (pCloses open)
343+ let ident = fromMaybe "" $ lookup "id" attr
344+ let classes = words $ fromMaybe [] $ lookup "class" attr
345+ let rest = filter (\(x,_) -> x /= "id" && x /= "class") attr
346+ return [Code (ident,classes,rest)
343− return [Code $ intercalate " " $ lines $ innerText result]
347+ $ intercalate " " $ lines $ innerText result]
344
348
345pRawHtmlInline :: TagParser [Inline]
349pRawHtmlInline :: TagParser [Inline]
346pRawHtmlInline = do
350pRawHtmlInline = do
src/Text/Pandoc/Readers/LaTeX.hs+5−5
@@ -710,27 +710,27 @@ code1 = try $ do
710 string "\\verb"
710 string "\\verb"
711 marker <- anyChar
711 marker <- anyChar
712 result <- manyTill anyChar (char marker)
712 result <- manyTill anyChar (char marker)
713− return $ Code $ removeLeadingTrailingSpace result
713+ return $ Code nullAttr $ removeLeadingTrailingSpace result
714
714
715code2 :: GenParser Char st Inline
715code2 :: GenParser Char st Inline
716code2 = try $ do
716code2 = try $ do
717 string "\\texttt{"
717 string "\\texttt{"
718 result <- manyTill (noneOf "\\\n~$%^&{}") (char '}')
718 result <- manyTill (noneOf "\\\n~$%^&{}") (char '}')
719− return $ Code result
719+ return $ Code nullAttr result
720
720
721code3 :: GenParser Char st Inline
721code3 :: GenParser Char st Inline
722code3 = try $ do
722code3 = try $ do
723 string "\\lstinline"
723 string "\\lstinline"
724 marker <- anyChar
724 marker <- anyChar
725 result <- manyTill anyChar (char marker)
725 result <- manyTill anyChar (char marker)
726− return $ Code $ removeLeadingTrailingSpace result
726+ return $ Code nullAttr $ removeLeadingTrailingSpace result
727
727
728lhsInlineCode :: GenParser Char ParserState Inline
728lhsInlineCode :: GenParser Char ParserState Inline
729lhsInlineCode = try $ do
729lhsInlineCode = try $ do
730 failUnlessLHS
730 failUnlessLHS
731 char '|'
731 char '|'
732 result <- manyTill (noneOf "|\n") (char '|')
732 result <- manyTill (noneOf "|\n") (char '|')
733− return $ Code result
733+ return $ Code ("",["haskell"],[]) result
734
734
735emph :: GenParser Char ParserState Inline
735emph :: GenParser Char ParserState Inline
736emph = try $ oneOfStrings [ "\\emph{", "\\textit{" ] >>
736emph = try $ oneOfStrings [ "\\emph{", "\\textit{" ] >>
@@ -861,7 +861,7 @@ url :: GenParser Char ParserState Inline
861url = try $ do
861url = try $ do
862 string "\\url"
862 string "\\url"
863 url' <- charsInBalanced '{' '}'
863 url' <- charsInBalanced '{' '}'
864− return $ Link [Code url'] (escapeURI url', "")
864+ return $ Link [Code ("",["url"],[]) url'] (escapeURI url', "")
865
865
866link :: GenParser Char ParserState Inline
866link :: GenParser Char ParserState Inline
867link = try $ do
867link = try $ do
src/Text/Pandoc/Readers/Markdown.hs+3−2
@@ -977,7 +977,8 @@ code = try $ do
977 (char '\n' >> notFollowedBy' blankline >> return " "))
977 (char '\n' >> notFollowedBy' blankline >> return " "))
978 (try (skipSpaces >> count (length starts) (char '`') >>
978 (try (skipSpaces >> count (length starts) (char '`') >>
979 notFollowedBy (char '`')))
979 notFollowedBy (char '`')))
980+ attr <- option ([],[],[]) (try $ optional whitespace >> attributes)
980− return $ Code $ removeLeadingTrailingSpace $ concat result
981+ return $ Code attr $ removeLeadingTrailingSpace $ concat result
981
982
982mathWord :: GenParser Char st [Char]
983mathWord :: GenParser Char st [Char]
983mathWord = liftM concat $ many1 mathChunk
984mathWord = liftM concat $ many1 mathChunk
@@ -1163,7 +1164,7 @@ autoLink = try $ do
1163 st <- getState
1164 st <- getState
1164 return $ if stateStrict st
1165 return $ if stateStrict st
1165 then Link [Str orig] (src, "")
1166 then Link [Str orig] (src, "")
1166− else Link [Code orig] (src, "")
1167+ else Link [Code ("",["url"],[]) orig] (src, "")
1167
1168
1168image :: GenParser Char ParserState Inline
1169image :: GenParser Char ParserState Inline
1169image = try $ do
1170image = try $ do
src/Text/Pandoc/Readers/RST.hs+2−1
@@ -746,7 +746,8 @@ code :: GenParser Char ParserState Inline
746code = try $ do
746code = try $ do
747 string "``"
747 string "``"
748 result <- manyTill anyChar (try (string "``"))
748 result <- manyTill anyChar (try (string "``"))
749+ return $ Code nullAttr
749− return $ Code $ removeLeadingTrailingSpace $ intercalate " " $ lines result
750+ $ removeLeadingTrailingSpace $ intercalate " " $ lines result
750
751
751emph :: GenParser Char ParserState Inline
752emph :: GenParser Char ParserState Inline
752emph = enclosed (char '*') (char '*') inline >>=
753emph = enclosed (char '*') (char '*') inline >>=
src/Text/Pandoc/Readers/TeXMath.hs+1−1
@@ -90,7 +90,7 @@ expToInlines (EUp x y) = expToInlines (ESuper x y)
90expToInlines (EDownup x y z) = expToInlines (ESubsup x y z)
90expToInlines (EDownup x y z) = expToInlines (ESubsup x y z)
91expToInlines (EText "normal" x) = Just [Str x]
91expToInlines (EText "normal" x) = Just [Str x]
92expToInlines (EText "bold" x) = Just [Strong [Str x]]
92expToInlines (EText "bold" x) = Just [Strong [Str x]]
93−expToInlines (EText "monospace" x) = Just [Code x]
93+expToInlines (EText "monospace" x) = Just [Code nullAttr x]
94expToInlines (EText "italic" x) = Just [Emph [Str x]]
94expToInlines (EText "italic" x) = Just [Emph [Str x]]
95expToInlines (EText _ x) = Just [Str x]
95expToInlines (EText _ x) = Just [Str x]
96expToInlines (EOver (EGrouped [EIdentifier [c]]) (ESymbol Accent [accent])) =
96expToInlines (EOver (EGrouped [EIdentifier [c]]) (ESymbol Accent [accent])) =
src/Text/Pandoc/Readers/Textile.hs+2−2
@@ -494,13 +494,13 @@ code :: GenParser Char ParserState Inline
494code = code1 <|> code2
494code = code1 <|> code2
495
495
496code1 :: GenParser Char ParserState Inline
496code1 :: GenParser Char ParserState Inline
497−code1 = surrounded (char '@') anyChar >>= return . Code
497+code1 = surrounded (char '@') anyChar >>= return . Code nullAttr
498
498
499code2 :: GenParser Char ParserState Inline
499code2 :: GenParser Char ParserState Inline
500code2 = do
500code2 = do
501 htmlTag (tagOpen (=="tt") null)
501 htmlTag (tagOpen (=="tt") null)
502 result' <- manyTill anyChar (try $ htmlTag $ tagClose (=="tt"))
502 result' <- manyTill anyChar (try $ htmlTag $ tagClose (=="tt"))
503− return $ Code result'
503+ return $ Code nullAttr result'
504
504
505-- | Html / CSS attributes
505-- | Html / CSS attributes
506attributes :: GenParser Char ParserState String
506attributes :: GenParser Char ParserState String
src/Text/Pandoc/Shared.hs+4−4
@@ -279,7 +279,7 @@ removeEmptyInlines (Superscript [] : zs) = removeEmptyInlines zs
279removeEmptyInlines (SmallCaps [] : zs) = removeEmptyInlines zs
279removeEmptyInlines (SmallCaps [] : zs) = removeEmptyInlines zs
280removeEmptyInlines (Strikeout [] : zs) = removeEmptyInlines zs
280removeEmptyInlines (Strikeout [] : zs) = removeEmptyInlines zs
281removeEmptyInlines (RawInline _ [] : zs) = removeEmptyInlines zs
281removeEmptyInlines (RawInline _ [] : zs) = removeEmptyInlines zs
282−removeEmptyInlines (Code [] : zs) = removeEmptyInlines zs
282+removeEmptyInlines (Code _ [] : zs) = removeEmptyInlines zs
283removeEmptyInlines (x : xs) = x : removeEmptyInlines xs
283removeEmptyInlines (x : xs) = x : removeEmptyInlines xs
284removeEmptyInlines [] = []
284removeEmptyInlines [] = []
285
285
@@ -312,8 +312,8 @@ consolidateInlines (Strikeout xs : Strikeout ys : zs) = consolidateInlines $
312 Strikeout (xs ++ ys) : zs
312 Strikeout (xs ++ ys) : zs
313consolidateInlines (RawInline f x : RawInline f' y : zs) | f == f' =
313consolidateInlines (RawInline f x : RawInline f' y : zs) | f == f' =
314 consolidateInlines $ RawInline f (x ++ y) : zs
314 consolidateInlines $ RawInline f (x ++ y) : zs
315−consolidateInlines (Code x : Code y : zs) = consolidateInlines $
315+consolidateInlines (Code a1 x : Code a2 y : zs) | a1 == a2 =
316− Code (x ++ y) : zs
316+ consolidateInlines $ Code a1 (x ++ y) : zs
317consolidateInlines (x : xs) = x : consolidateInlines xs
317consolidateInlines (x : xs) = x : consolidateInlines xs
318consolidateInlines [] = []
318consolidateInlines [] = []
319
319
@@ -323,7 +323,7 @@ stringify = queryWith go
323 where go :: Inline -> [Char]
323 where go :: Inline -> [Char]
324 go Space = " "
324 go Space = " "
325 go (Str x) = x
325 go (Str x) = x
326− go (Code x) = x
326+ go (Code _ x) = x
327 go (Math _ x) = x
327 go (Math _ x) = x
328 go EmDash = "--"
328 go EmDash = "--"
329 go EnDash = "-"
329 go EnDash = "-"
src/Text/Pandoc/Writers/ConTeXt.hs+3−3
@@ -245,9 +245,9 @@ inlineToConTeXt (Subscript lst) = do
245inlineToConTeXt (SmallCaps lst) = do
245inlineToConTeXt (SmallCaps lst) = do
246 contents <- inlineListToConTeXt lst
246 contents <- inlineListToConTeXt lst
247 return $ braces $ "\\sc " <> contents
247 return $ braces $ "\\sc " <> contents
248−inlineToConTeXt (Code str) | not ('{' `elem` str || '}' `elem` str) =
248+inlineToConTeXt (Code _ str) | not ('{' `elem` str || '}' `elem` str) =
249 return $ "\\type" <> braces (text str)
249 return $ "\\type" <> braces (text str)
250−inlineToConTeXt (Code str) =
250+inlineToConTeXt (Code _ str) =
251 return $ "\\mono" <> braces (text $ stringToConTeXt str)
251 return $ "\\mono" <> braces (text $ stringToConTeXt str)
252inlineToConTeXt (Quoted SingleQuote lst) = do
252inlineToConTeXt (Quoted SingleQuote lst) = do
253 contents <- inlineListToConTeXt lst
253 contents <- inlineListToConTeXt lst
@@ -270,7 +270,7 @@ inlineToConTeXt (RawInline "tex" str) = return $ text str
270inlineToConTeXt (RawInline _ _) = return empty
270inlineToConTeXt (RawInline _ _) = return empty
271inlineToConTeXt (LineBreak) = return $ text "\\crlf" <> cr
271inlineToConTeXt (LineBreak) = return $ text "\\crlf" <> cr
272inlineToConTeXt Space = return space
272inlineToConTeXt Space = return space
273−inlineToConTeXt (Link [Code str] (src, tit)) = -- since ConTeXt has its own
273+inlineToConTeXt (Link [Code _ str] (src, tit)) = -- since ConTeXt has its own
274 inlineToConTeXt (Link [Str str] (src, tit)) -- way of printing links...
274 inlineToConTeXt (Link [Str str] (src, tit)) -- way of printing links...
275inlineToConTeXt (Link txt (src, _)) = do
275inlineToConTeXt (Link txt (src, _)) = do
276 st <- get
276 st <- get
src/Text/Pandoc/Writers/Docbook.hs+5−5
@@ -258,7 +258,7 @@ inlineToDocbook _ Apostrophe = char '\''
258inlineToDocbook _ Ellipses = text "…"
258inlineToDocbook _ Ellipses = text "…"
259inlineToDocbook _ EmDash = text "—"
259inlineToDocbook _ EmDash = text "—"
260inlineToDocbook _ EnDash = text "–"
260inlineToDocbook _ EnDash = text "–"
261−inlineToDocbook _ (Code str) =
261+inlineToDocbook _ (Code _ str) =
262 inTagsSimple "literal" $ text (escapeStringForXML str)
262 inTagsSimple "literal" $ text (escapeStringForXML str)
263inlineToDocbook opts (Math _ str) = inlinesToDocbook opts $ readTeXMath str
263inlineToDocbook opts (Math _ str) = inlinesToDocbook opts $ readTeXMath str
264inlineToDocbook _ (RawInline _ _) = empty
264inlineToDocbook _ (RawInline _ _) = empty
@@ -269,10 +269,10 @@ inlineToDocbook opts (Link txt (src, _)) =
269 then let src' = drop 7 src
269 then let src' = drop 7 src
270 emailLink = inTagsSimple "email" $ text $
270 emailLink = inTagsSimple "email" $ text $
271 escapeStringForXML $ src'
271 escapeStringForXML $ src'
272− in if txt == [Code src']
272+ in case txt of
273− then emailLink
273+ [Code _ s] | s == src' -> emailLink
274− else inlinesToDocbook opts txt <+> char '(' <> emailLink <>
274+ _ -> inlinesToDocbook opts txt <+>
275− char ')'
275+ char '(' <> emailLink <> char ')'
276 else (if isPrefixOf "#" src
276 else (if isPrefixOf "#" src
277 then inTags False "link" [("linkend", drop 1 src)]
277 then inTags False "link" [("linkend", drop 1 src)]
278 else inTags False "ulink" [("url", src)]) $
278 else inTags False "ulink" [("url", src)]) $
src/Text/Pandoc/Writers/HTML.hs+12−5
@@ -298,6 +298,12 @@ obfuscateChar char =
298obfuscateString :: String -> String
298obfuscateString :: String -> String
299obfuscateString = concatMap obfuscateChar . decodeCharacterReferences
299obfuscateString = concatMap obfuscateChar . decodeCharacterReferences
300
300
301+attrsToHtml :: WriterOptions -> Attr -> [HtmlAttr]
302+attrsToHtml opts (id',classes',keyvals) =
303+ [theclass (unwords classes') | not (null classes')] ++
304+ [prefixedId opts id' | not (null id')] ++
305+ map (\(x,y) -> strAttr x y) keyvals
306+
301-- | Convert Pandoc block element to HTML.
307-- | Convert Pandoc block element to HTML.
302blockToHtml :: WriterOptions -> Block -> State WriterState Html
308blockToHtml :: WriterOptions -> Block -> State WriterState Html
303blockToHtml _ Null = return $ noHtml
309blockToHtml _ Null = return $ noHtml
@@ -322,9 +328,7 @@ blockToHtml opts (CodeBlock (id',classes,keyvals) rawCode) = do
322 Left _ -> -- change leading newlines into <br /> tags, because some
328 Left _ -> -- change leading newlines into <br /> tags, because some
323 -- browsers ignore leading newlines in pre blocks
329 -- browsers ignore leading newlines in pre blocks
324 let (leadingBreaks, rawCode') = span (=='\n') rawCode
330 let (leadingBreaks, rawCode') = span (=='\n') rawCode
325− attrs = [theclass (unwords classes') | not (null classes')] ++
331+ attrs = attrsToHtml opts (id', classes', keyvals)
326− [prefixedId opts id' | not (null id')] ++
327− map (\(x,y) -> strAttr x y) keyvals
328 addBird = if "literate" `elem` classes'
332 addBird = if "literate" `elem` classes'
329 then unlines . map ("> " ++) . lines
333 then unlines . map ("> " ++) . lines
330 else unlines . lines
334 else unlines . lines
@@ -479,7 +483,10 @@ inlineToHtml opts inline =
479 (Apostrophe) -> return $ stringToHtml "’"
483 (Apostrophe) -> return $ stringToHtml "’"
480 (Emph lst) -> inlineListToHtml opts lst >>= return . emphasize
484 (Emph lst) -> inlineListToHtml opts lst >>= return . emphasize
481 (Strong lst) -> inlineListToHtml opts lst >>= return . strong
485 (Strong lst) -> inlineListToHtml opts lst >>= return . strong
482− (Code str) -> return $ thecode << str
486+ (Code attr str) -> return $ thecode ! (attrsToHtml opts attr) << str'
487+ where str' = case highlightHtml attr str of
488+ Left _ -> stringToHtml str
489+ Right h -> h
483 (Strikeout lst) -> inlineListToHtml opts lst >>=
490 (Strikeout lst) -> inlineListToHtml opts lst >>=
484 return . (thespan ! [thestyle "text-decoration: line-through;"])
491 return . (thespan ! [thestyle "text-decoration: line-through;"])
485 (SmallCaps lst) -> inlineListToHtml opts lst >>=
492 (SmallCaps lst) -> inlineListToHtml opts lst >>=
@@ -547,7 +554,7 @@ inlineToHtml opts inline =
547 _ -> return noHtml
554 _ -> return noHtml
548 (RawInline "html" str) -> return $ primHtml str
555 (RawInline "html" str) -> return $ primHtml str
549 (RawInline _ _) -> return noHtml
556 (RawInline _ _) -> return noHtml
550− (Link [Code str] (s,_)) | "mailto:" `isPrefixOf` s ->
557+ (Link [Code _ str] (s,_)) | "mailto:" `isPrefixOf` s ->
551 return $ obfuscateLink opts str s
558 return $ obfuscateLink opts str s
552 (Link txt (s,_)) | "mailto:" `isPrefixOf` s -> do
559 (Link txt (s,_)) | "mailto:" `isPrefixOf` s -> do
553 linkText <- inlineListToHtml opts txt
560 linkText <- inlineListToHtml opts txt
src/Text/Pandoc/Writers/LaTeX.hs+3−3
@@ -150,7 +150,7 @@ inCmd cmd contents = char '\\' <> text cmd <> braces contents
150-- (because it's illegal to have verbatim inside some command arguments)
150-- (because it's illegal to have verbatim inside some command arguments)
151deVerb :: [Inline] -> [Inline]
151deVerb :: [Inline] -> [Inline]
152deVerb [] = []
152deVerb [] = []
153−deVerb ((Code str):rest) =
153+deVerb ((Code _ str):rest) =
154 (RawInline "latex" $ "\\texttt{" ++ stringToLaTeX str ++ "}"):(deVerb rest)
154 (RawInline "latex" $ "\\texttt{" ++ stringToLaTeX str ++ "}"):(deVerb rest)
155deVerb (other:rest) = other:(deVerb rest)
155deVerb (other:rest) = other:(deVerb rest)
156
156
@@ -331,7 +331,7 @@ inlineToLaTeX (Cite cits lst) = do
331 Biblatex -> citationsToBiblatex cits
331 Biblatex -> citationsToBiblatex cits
332 _ -> inlineListToLaTeX lst
332 _ -> inlineListToLaTeX lst
333
333
334−inlineToLaTeX (Code str) = do
334+inlineToLaTeX (Code _ str) = do
335 st <- get
335 st <- get
336 when (stInNote st) $ modify $ \s -> s{ stVerbInNote = True }
336 when (stInNote st) $ modify $ \s -> s{ stVerbInNote = True }
337 let chr = ((enumFromTo '!' '~') \\ str) !! 0
337 let chr = ((enumFromTo '!' '~') \\ str) !! 0
@@ -368,7 +368,7 @@ inlineToLaTeX (LineBreak) = return "\\\\"
368inlineToLaTeX Space = return space
368inlineToLaTeX Space = return space
369inlineToLaTeX (Link txt (src, _)) =
369inlineToLaTeX (Link txt (src, _)) =
370 case txt of
370 case txt of
371− [Code x] | x == src -> -- autolink
371+ [Code _ x] | x == src -> -- autolink
372 do modify $ \s -> s{ stUrl = True }
372 do modify $ \s -> s{ stUrl = True }
373 return $ text $ "\\url{" ++ x ++ "}"
373 return $ text $ "\\url{" ++ x ++ "}"
374 _ -> do contents <- inlineListToLaTeX $ deVerb txt
374 _ -> do contents <- inlineListToLaTeX $ deVerb txt
src/Text/Pandoc/Writers/Man.hs+5−4
@@ -307,7 +307,7 @@ inlineToMan _ EmDash = return $ text "\\[em]"
307inlineToMan _ EnDash = return $ text "\\[en]"
307inlineToMan _ EnDash = return $ text "\\[en]"
308inlineToMan _ Apostrophe = return $ char '\''
308inlineToMan _ Apostrophe = return $ char '\''
309inlineToMan _ Ellipses = return $ text "\\&..."
309inlineToMan _ Ellipses = return $ text "\\&..."
310−inlineToMan _ (Code str) =
310+inlineToMan _ (Code _ str) =
311 return $ text $ "\\f[C]" ++ escapeCode str ++ "\\f[]"
311 return $ text $ "\\f[C]" ++ escapeCode str ++ "\\f[]"
312inlineToMan _ (Str str) = return $ text $ escapeString str
312inlineToMan _ (Str str) = return $ text $ escapeString str
313inlineToMan opts (Math InlineMath str) = inlineListToMan opts $ readTeXMath str
313inlineToMan opts (Math InlineMath str) = inlineListToMan opts $ readTeXMath str
@@ -322,9 +322,10 @@ inlineToMan _ Space = return space
322inlineToMan opts (Link txt (src, _)) = do
322inlineToMan opts (Link txt (src, _)) = do
323 linktext <- inlineListToMan opts txt
323 linktext <- inlineListToMan opts txt
324 let srcSuffix = if isPrefixOf "mailto:" src then drop 7 src else src
324 let srcSuffix = if isPrefixOf "mailto:" src then drop 7 src else src
325− return $ if txt == [Code srcSuffix]
325+ return $ case txt of
326+ [Code _ s]
326− then char '<' <> text srcSuffix <> char '>'
327+ | s == srcSuffix -> char '<' <> text srcSuffix <> char '>'
327− else linktext <> text " (" <> text src <> char ')'
328+ _ -> linktext <> text " (" <> text src <> char ')'
328inlineToMan opts (Image alternate (source, tit)) = do
329inlineToMan opts (Image alternate (source, tit)) = do
329 let txt = if (null alternate) || (alternate == [Str ""]) ||
330 let txt = if (null alternate) || (alternate == [Str ""]) ||
330 (alternate == [Str source]) -- to prevent autolinks
331 (alternate == [Str source]) -- to prevent autolinks
src/Text/Pandoc/Writers/Markdown.hs+28−20
@@ -73,7 +73,7 @@ plainify = bottomUp go
73 go (Superscript xs) = SmallCaps xs
73 go (Superscript xs) = SmallCaps xs
74 go (Subscript xs) = SmallCaps xs
74 go (Subscript xs) = SmallCaps xs
75 go (SmallCaps xs) = SmallCaps xs
75 go (SmallCaps xs) = SmallCaps xs
76− go (Code s) = Str s
76+ go (Code _ s) = Str s
77 go (Math _ s) = Str s
77 go (Math _ s) = Str s
78 go (RawInline _ _) = Str ""
78 go (RawInline _ _) = Str ""
79 go (Link xs _) = SmallCaps xs
79 go (Link xs _) = SmallCaps xs
@@ -171,6 +171,22 @@ elementToListItem (Sec _ _ _ headerText subsecs) = [Plain headerText] ++
171 then []
171 then []
172 else [BulletList $ map elementToListItem subsecs]
172 else [BulletList $ map elementToListItem subsecs]
173
173
174+attrsToMarkdown :: Attr -> Doc
175+attrsToMarkdown attribs = braces $ hsep [attribId, attribClasses, attribKeys]
176+ where attribId = case attribs of
177+ ([],_,_) -> empty
178+ (i,_,_) -> "#" <> text i
179+ attribClasses = case attribs of
180+ (_,[],_) -> empty
181+ (_,cs,_) -> hsep $
182+ map (text . ('.':))
183+ cs
184+ attribKeys = case attribs of
185+ (_,_,[]) -> empty
186+ (_,_,ks) -> hsep $
187+ map (\(k,v) -> text k
188+ <> "=\"" <> text v <> "\"") ks
189+
174-- | Ordered list start parser for use in Para below.
190-- | Ordered list start parser for use in Para below.
175olMarker :: GenParser Char ParserState Char
191olMarker :: GenParser Char ParserState Char
176olMarker = do (start, style', delim) <- anyOrderedListMarker
192olMarker = do (start, style', delim) <- anyOrderedListMarker
@@ -233,26 +249,13 @@ blockToMarkdown opts (CodeBlock (_,classes,_) str)
233 writerLiterateHaskell opts =
249 writerLiterateHaskell opts =
234 return $ prefixed "> " (text str) <> blankline
250 return $ prefixed "> " (text str) <> blankline
235blockToMarkdown opts (CodeBlock attribs str) = return $
251blockToMarkdown opts (CodeBlock attribs str) = return $
236− if writerStrictMarkdown opts || attribs == ([],[],[])
252+ if writerStrictMarkdown opts || attribs == nullAttr
237 then nest (writerTabStop opts) (text str) <> blankline
253 then nest (writerTabStop opts) (text str) <> blankline
238 else -- use delimited code block
254 else -- use delimited code block
239 flush (tildes <> space <> attrs <> cr <> text str <>
255 flush (tildes <> space <> attrs <> cr <> text str <>
240 cr <> tildes) <> blankline
256 cr <> tildes) <> blankline
241 where tildes = text "~~~~"
257 where tildes = text "~~~~"
242− attrs = braces $ hsep [attribId, attribClasses, attribKeys]
258+ attrs = attrsToMarkdown attribs
243− attribId = case attribs of
244− ([],_,_) -> empty
245− (i,_,_) -> "#" <> text i
246− attribClasses = case attribs of
247− (_,[],_) -> empty
248− (_,cs,_) -> hsep $
249− map (text . ('.':))
250− cs
251− attribKeys = case attribs of
252− (_,_,[]) -> empty
253− (_,_,ks) -> hsep $
254− map (\(k,v) -> text k
255− <> "=\"" <> text v <> "\"") ks
256blockToMarkdown opts (BlockQuote blocks) = do
259blockToMarkdown opts (BlockQuote blocks) = do
257 st <- get
260 st <- get
258 -- if we're writing literate haskell, put a space before the bird tracks
261 -- if we're writing literate haskell, put a space before the bird tracks
@@ -423,14 +426,17 @@ inlineToMarkdown _ EmDash = return "\8212"
423inlineToMarkdown _ EnDash = return "\8211"
426inlineToMarkdown _ EnDash = return "\8211"
424inlineToMarkdown _ Apostrophe = return "\8217"
427inlineToMarkdown _ Apostrophe = return "\8217"
425inlineToMarkdown _ Ellipses = return "\8230"
428inlineToMarkdown _ Ellipses = return "\8230"
426−inlineToMarkdown _ (Code str) =
429+inlineToMarkdown opts (Code attr str) =
427 let tickGroups = filter (\s -> '`' `elem` s) $ group str
430 let tickGroups = filter (\s -> '`' `elem` s) $ group str
428 longest = if null tickGroups
431 longest = if null tickGroups
429 then 0
432 then 0
430 else maximum $ map length tickGroups
433 else maximum $ map length tickGroups
431 marker = replicate (longest + 1) '`'
434 marker = replicate (longest + 1) '`'
432− spacer = if (longest == 0) then "" else " " in
435+ spacer = if (longest == 0) then "" else " "
436+ attrs = if writerStrictMarkdown opts || attr == nullAttr
437+ then empty
438+ else attrsToMarkdown attr
433− return $ text (marker ++ spacer ++ str ++ spacer ++ marker)
439+ in return $ text (marker ++ spacer ++ str ++ spacer ++ marker) <> attrs
434inlineToMarkdown _ (Str str) = do
440inlineToMarkdown _ (Str str) = do
435 st <- get
441 st <- get
436 if stPlain st
442 if stPlain st
@@ -485,7 +491,9 @@ inlineToMarkdown opts (Link txt (src', tit)) = do
485 let src = unescapeURI src'
491 let src = unescapeURI src'
486 let srcSuffix = if isPrefixOf "mailto:" src then drop 7 src else src
492 let srcSuffix = if isPrefixOf "mailto:" src then drop 7 src else src
487 let useRefLinks = writerReferenceLinks opts
493 let useRefLinks = writerReferenceLinks opts
488− let useAuto = null tit && txt == [Code srcSuffix]
494+ let useAuto = case (tit,txt) of
495+ ("", [Code _ s]) | s == srcSuffix -> True
496+ _ -> False
489 ref <- if useRefLinks then getReference txt (src, tit) else return []
497 ref <- if useRefLinks then getReference txt (src, tit) else return []
490 reftext <- inlineListToMarkdown opts ref
498 reftext <- inlineListToMarkdown opts ref
491 return $ if useAuto
499 return $ if useAuto
src/Text/Pandoc/Writers/MediaWiki.hs+7−7
@@ -362,7 +362,7 @@ inlineToMediaWiki _ Apostrophe = return "&rsquo;"
362
362
363inlineToMediaWiki _ Ellipses = return "&hellip;"
363inlineToMediaWiki _ Ellipses = return "&hellip;"
364
364
365−inlineToMediaWiki _ (Code str) =
365+inlineToMediaWiki _ (Code _ str) =
366 return $ "<tt>" ++ (escapeString str) ++ "</tt>"
366 return $ "<tt>" ++ (escapeString str) ++ "</tt>"
367
367
368inlineToMediaWiki _ (Str str) = return $ escapeString str
368inlineToMediaWiki _ (Str str) = return $ escapeString str
@@ -380,12 +380,12 @@ inlineToMediaWiki _ Space = return " "
380
380
381inlineToMediaWiki opts (Link txt (src, _)) = do
381inlineToMediaWiki opts (Link txt (src, _)) = do
382 label <- inlineListToMediaWiki opts txt
382 label <- inlineListToMediaWiki opts txt
383− if txt == [Code src] -- autolink
383+ case txt of
384− then return src
384+ [Code _ s] | s == src -> return src
385− else if isURI src
385+ _ -> if isURI src
386− then return $ "[" ++ src ++ " " ++ label ++ "]"
386+ then return $ "[" ++ src ++ " " ++ label ++ "]"
387− else return $ "[[" ++ src' ++ "|" ++ label ++ "]]"
387+ else return $ "[[" ++ src' ++ "|" ++ label ++ "]]"
388− where src' = case src of
388+ where src' = case src of
389 '/':xs -> xs -- with leading / it's a
389 '/':xs -> xs -- with leading / it's a
390 _ -> src -- link to a help page
390 _ -> src -- link to a help page
391inlineToMediaWiki opts (Image alt (source, tit)) = do
391inlineToMediaWiki opts (Image alt (source, tit)) = do
src/Text/Pandoc/Writers/OpenDocument.hs+1−1
@@ -362,7 +362,7 @@ inlineToOpenDocument o ils
362 | Subscript l <- ils = withTextStyle Sub $ inlinesToOpenDocument o l
362 | Subscript l <- ils = withTextStyle Sub $ inlinesToOpenDocument o l
363 | SmallCaps l <- ils = withTextStyle SmallC $ inlinesToOpenDocument o l
363 | SmallCaps l <- ils = withTextStyle SmallC $ inlinesToOpenDocument o l
364 | Quoted t l <- ils = inQuotes t <$> inlinesToOpenDocument o l
364 | Quoted t l <- ils = inQuotes t <$> inlinesToOpenDocument o l
365− | Code s <- ils = preformatted s
365+ | Code _ s <- ils = preformatted s
366 | Math _ s <- ils = inlinesToOpenDocument o (readTeXMath s)
366 | Math _ s <- ils = inlinesToOpenDocument o (readTeXMath s)
367 | Cite _ l <- ils = inlinesToOpenDocument o l
367 | Cite _ l <- ils = inlinesToOpenDocument o l
368 | RawInline "opendocument" s <- ils = preformatted s
368 | RawInline "opendocument" s <- ils = preformatted s
src/Text/Pandoc/Writers/Org.hs+2−2
@@ -253,7 +253,7 @@ inlineToOrg EmDash = return "---"
253inlineToOrg EnDash = return "--"
253inlineToOrg EnDash = return "--"
254inlineToOrg Apostrophe = return "'"
254inlineToOrg Apostrophe = return "'"
255inlineToOrg Ellipses = return "..."
255inlineToOrg Ellipses = return "..."
256−inlineToOrg (Code str) = return $ "=" <> text str <> "="
256+inlineToOrg (Code _ str) = return $ "=" <> text str <> "="
257inlineToOrg (Str str) = return $ text $ escapeString str
257inlineToOrg (Str str) = return $ text $ escapeString str
258inlineToOrg (Math t str) = do
258inlineToOrg (Math t str) = do
259 modify $ \st -> st{ stHasMath = True }
259 modify $ \st -> st{ stHasMath = True }
@@ -266,7 +266,7 @@ inlineToOrg (LineBreak) = return cr -- there's no line break in Org
266inlineToOrg Space = return space
266inlineToOrg Space = return space
267inlineToOrg (Link txt (src, _)) = do
267inlineToOrg (Link txt (src, _)) = do
268 case txt of
268 case txt of
269− [Code x] | x == src -> -- autolink
269+ [Code _ x] | x == src -> -- autolink
270 do modify $ \s -> s{ stLinks = True }
270 do modify $ \s -> s{ stLinks = True }
271 return $ "[[" <> text x <> "]]"
271 return $ "[[" <> text x <> "]]"
272 _ -> do contents <- inlineListToOrg txt
272 _ -> do contents <- inlineListToOrg txt
src/Text/Pandoc/Writers/RST.hs+3−3
@@ -285,7 +285,7 @@ inlineToRST EmDash = return $ char '\8212'
285inlineToRST EnDash = return $ char '\8211'
285inlineToRST EnDash = return $ char '\8211'
286inlineToRST Apostrophe = return $ char '\8217'
286inlineToRST Apostrophe = return $ char '\8217'
287inlineToRST Ellipses = return $ char '\8230'
287inlineToRST Ellipses = return $ char '\8230'
288−inlineToRST (Code str) = return $ "``" <> text str <> "``"
288+inlineToRST (Code _ str) = return $ "``" <> text str <> "``"
289inlineToRST (Str str) = return $ text $ escapeString str
289inlineToRST (Str str) = return $ text $ escapeString str
290inlineToRST (Math t str) = do
290inlineToRST (Math t str) = do
291 modify $ \st -> st{ stHasMath = True }
291 modify $ \st -> st{ stHasMath = True }
@@ -295,8 +295,8 @@ inlineToRST (Math t str) = do
295inlineToRST (RawInline _ _) = return empty
295inlineToRST (RawInline _ _) = return empty
296inlineToRST (LineBreak) = return cr -- there's no line break in RST
296inlineToRST (LineBreak) = return cr -- there's no line break in RST
297inlineToRST Space = return space
297inlineToRST Space = return space
298−inlineToRST (Link [Code str] (src, _)) | src == str ||
298+inlineToRST (Link [Code _ str] (src, _)) | src == str ||
299− src == "mailto:" ++ str = do
299+ src == "mailto:" ++ str = do
300 let srcSuffix = if isPrefixOf "mailto:" src then drop 7 src else src
300 let srcSuffix = if isPrefixOf "mailto:" src then drop 7 src else src
301 return $ text $ unescapeURI srcSuffix
301 return $ text $ unescapeURI srcSuffix
302inlineToRST (Link txt (src', tit)) = do
302inlineToRST (Link txt (src', tit)) = do
src/Text/Pandoc/Writers/RTF.hs+1−1
@@ -265,7 +265,7 @@ inlineToRTF Apostrophe = "\\u8217'"
265inlineToRTF Ellipses = "\\u8230?"
265inlineToRTF Ellipses = "\\u8230?"
266inlineToRTF EmDash = "\\u8212-"
266inlineToRTF EmDash = "\\u8212-"
267inlineToRTF EnDash = "\\u8211-"
267inlineToRTF EnDash = "\\u8211-"
268−inlineToRTF (Code str) = "{\\f1 " ++ (codeStringToRTF str) ++ "}"
268+inlineToRTF (Code _ str) = "{\\f1 " ++ (codeStringToRTF str) ++ "}"
269inlineToRTF (Str str) = stringToRTF str
269inlineToRTF (Str str) = stringToRTF str
270inlineToRTF (Math _ str) = inlineListToRTF $ readTeXMath str
270inlineToRTF (Math _ str) = inlineListToRTF $ readTeXMath str
271inlineToRTF (Cite _ lst) = inlineListToRTF lst
271inlineToRTF (Cite _ lst) = inlineListToRTF lst
src/Text/Pandoc/Writers/Texinfo.hs+2−2
@@ -372,7 +372,7 @@ inlineToTexinfo (Subscript lst) = do
372inlineToTexinfo (SmallCaps lst) =
372inlineToTexinfo (SmallCaps lst) =
373 inlineListToTexinfo lst >>= return . inCmd "sc"
373 inlineListToTexinfo lst >>= return . inCmd "sc"
374
374
375−inlineToTexinfo (Code str) = do
375+inlineToTexinfo (Code _ str) = do
376 return $ text $ "@code{" ++ stringToTexinfo str ++ "}"
376 return $ text $ "@code{" ++ stringToTexinfo str ++ "}"
377
377
378inlineToTexinfo (Quoted SingleQuote lst) = do
378inlineToTexinfo (Quoted SingleQuote lst) = do
@@ -400,7 +400,7 @@ inlineToTexinfo Space = return $ char ' '
400
400
401inlineToTexinfo (Link txt (src, _)) = do
401inlineToTexinfo (Link txt (src, _)) = do
402 case txt of
402 case txt of
403− [Code x] | x == src -> -- autolink
403+ [Code _ x] | x == src -> -- autolink
404 do return $ text $ "@url{" ++ x ++ "}"
404 do return $ text $ "@url{" ++ x ++ "}"
405 _ -> do contents <- inlineListToTexinfo txt
405 _ -> do contents <- inlineListToTexinfo txt
406 let src1 = stringToTexinfo src
406 let src1 = stringToTexinfo src
src/Text/Pandoc/Writers/Textile.hs+3−3
@@ -378,7 +378,7 @@ inlineToTextile _ Apostrophe = return "'"
378
378
379inlineToTextile _ Ellipses = return "..."
379inlineToTextile _ Ellipses = return "..."
380
380
381−inlineToTextile _ (Code str) =
381+inlineToTextile _ (Code _ str) =
382 return $ if '@' `elem` str
382 return $ if '@' `elem` str
383 then "<tt>" ++ escapeStringForXML str ++ "</tt>"
383 then "<tt>" ++ escapeStringForXML str ++ "</tt>"
384 else "@" ++ str ++ "@"
384 else "@" ++ str ++ "@"
@@ -399,8 +399,8 @@ inlineToTextile _ Space = return " "
399
399
400inlineToTextile opts (Link txt (src, _)) = do
400inlineToTextile opts (Link txt (src, _)) = do
401 label <- case txt of
401 label <- case txt of
402− [Code s] -> return s
402+ [Code _ s] -> return s
403− _ -> inlineListToTextile opts txt
403+ _ -> inlineListToTextile opts txt
404 return $ "\"" ++ label ++ "\":" ++ src
404 return $ "\"" ++ label ++ "\":" ++ src
405
405
406inlineToTextile opts (Image alt (source, tit)) = do
406inlineToTextile opts (Image alt (source, tit)) = do
tests/Tests/Arbitrary.hs+1−1
@@ -30,7 +30,7 @@ instance Arbitrary Inline where
30arbInline :: Int -> Gen Inline
30arbInline :: Int -> Gen Inline
31arbInline n = frequency $ [ (60, liftM Str realString)
31arbInline n = frequency $ [ (60, liftM Str realString)
32 , (60, return Space)
32 , (60, return Space)
33− , (10, liftM Code realString)
33+ , (10, liftM2 Code arbitrary realString)
34 , (5, return EmDash)
34 , (5, return EmDash)
35 , (5, return EnDash)
35 , (5, return EnDash)
36 , (5, return Apostrophe)
36 , (5, return Apostrophe)
tests/html-reader.native+5−5
@@ -224,14 +224,14 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
224,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word",Str "."]
224,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word",Str "."]
225,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em",Str "."]]]
225,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em",Str "."]]]
226,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word",Str "."]
226,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word",Str "."]
227−,Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ">",Str ",",Space,Code "$",Str ",",Space,Code "\\",Str ",",Space,Code "\\$",Str ",",Space,Code "<html>",Str "."]
227+,Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ("",[],[]) ">",Str ",",Space,Code ("",[],[]) "$",Str ",",Space,Code ("",[],[]) "\\",Str ",",Space,Code ("",[],[]) "\\$",Str ",",Space,Code ("",[],[]) "<html>",Str "."]
228,HorizontalRule
228,HorizontalRule
229,Header 1 [Str "Smart",Space,Str "quotes,",Space,Str "ellipses,",Space,Str "dashes"]
229,Header 1 [Str "Smart",Space,Str "quotes,",Space,Str "ellipses,",Space,Str "dashes"]
230,Para [Str "\"",Str "Hello,",Str "\"",Space,Str "said",Space,Str "the",Space,Str "spider",Str ".",Space,Str "\"",Str "'",Str "Shelob",Str "'",Space,Str "is",Space,Str "my",Space,Str "name",Str ".",Str "\""]
230,Para [Str "\"",Str "Hello,",Str "\"",Space,Str "said",Space,Str "the",Space,Str "spider",Str ".",Space,Str "\"",Str "'",Str "Shelob",Str "'",Space,Str "is",Space,Str "my",Space,Str "name",Str ".",Str "\""]
231,Para [Str "'",Str "A",Str "'",Str ",",Space,Str "'",Str "B",Str "'",Str ",",Space,Str "and",Space,Str "'",Str "C",Str "'",Space,Str "are",Space,Str "letters",Str "."]
231,Para [Str "'",Str "A",Str "'",Str ",",Space,Str "'",Str "B",Str "'",Str ",",Space,Str "and",Space,Str "'",Str "C",Str "'",Space,Str "are",Space,Str "letters",Str "."]
232,Para [Str "'",Str "Oak,",Str "'",Space,Str "'",Str "elm,",Str "'",Space,Str "and",Space,Str "'",Str "beech",Str "'",Space,Str "are",Space,Str "names",Space,Str "of",Space,Str "trees",Str ".",Space,Str "So",Space,Str "is",Space,Str "'",Str "pine",Str ".",Str "'"]
232,Para [Str "'",Str "Oak,",Str "'",Space,Str "'",Str "elm,",Str "'",Space,Str "and",Space,Str "'",Str "beech",Str "'",Space,Str "are",Space,Str "names",Space,Str "of",Space,Str "trees",Str ".",Space,Str "So",Space,Str "is",Space,Str "'",Str "pine",Str ".",Str "'"]
233,Para [Str "'",Str "He",Space,Str "said,",Space,Str "\"",Str "I",Space,Str "want",Space,Str "to",Space,Str "go",Str ".",Str "\"",Str "'",Space,Str "Were",Space,Str "you",Space,Str "alive",Space,Str "in",Space,Str "the",Space,Str "70",Str "'",Str "s?"]
233,Para [Str "'",Str "He",Space,Str "said,",Space,Str "\"",Str "I",Space,Str "want",Space,Str "to",Space,Str "go",Str ".",Str "\"",Str "'",Space,Str "Were",Space,Str "you",Space,Str "alive",Space,Str "in",Space,Str "the",Space,Str "70",Str "'",Str "s?"]
234−,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "quoted",Space,Str "'",Code "code",Str "'",Space,Str "and",Space,Str "a",Space,Str "\"",Link [Str "quoted",Space,Str "link"] ("http://example.com/?foo=1&bar=2",""),Str "\"",Str "."]
234+,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "quoted",Space,Str "'",Code ("",[],[]) "code",Str "'",Space,Str "and",Space,Str "a",Space,Str "\"",Link [Str "quoted",Space,Str "link"] ("http://example.com/?foo=1&bar=2",""),Str "\"",Str "."]
235,Para [Str "Some",Space,Str "dashes:",Space,Str "one",Str "-",Str "-",Str "-",Str "two",Space,Str "-",Str "-",Str "-",Space,Str "three",Str "-",Str "-",Str "four",Space,Str "-",Str "-",Space,Str "five",Str "."]
235,Para [Str "Some",Space,Str "dashes:",Space,Str "one",Str "-",Str "-",Str "-",Str "two",Space,Str "-",Str "-",Str "-",Space,Str "three",Str "-",Str "-",Str "four",Space,Str "-",Str "-",Space,Str "five",Str "."]
236,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",Str "."]
236,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",Str "."]
237,Para [Str "Ellipses",Str ".",Str ".",Str ".",Str "and",Str ".",Space,Str ".",Space,Str ".",Str "and",Space,Str ".",Space,Str ".",Space,Str ".",Space,Str "."]
237,Para [Str "Ellipses",Str ".",Str ".",Str ".",Str "and",Str ".",Space,Str ".",Space,Str ".",Str "and",Space,Str ".",Space,Str ".",Space,Str ".",Space,Str "."]
@@ -249,9 +249,9 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
249 ,[Plain [Str "Here",Str "'",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,Str "$\\alpha",Space,Str "+",Space,Str "\\omega",Space,Str "\\times",Space,Str "x^2$",Str "."]]]
249 ,[Plain [Str "Here",Str "'",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,Str "$\\alpha",Space,Str "+",Space,Str "\\omega",Space,Str "\\times",Space,Str "x^2$",Str "."]]]
250,Para [Str "These",Space,Str "shouldn",Str "'",Str "t",Space,Str "be",Space,Str "math:"]
250,Para [Str "These",Space,Str "shouldn",Str "'",Str "t",Space,Str "be",Space,Str "math:"]
251,BulletList
251,BulletList
252− [[Plain [Str "To",Space,Str "get",Space,Str "the",Space,Str "famous",Space,Str "equation,",Space,Str "write",Space,Code "$e = mc^2$",Str "."]]
252+ [[Plain [Str "To",Space,Str "get",Space,Str "the",Space,Str "famous",Space,Str "equation,",Space,Str "write",Space,Code ("",[],[]) "$e = mc^2$",Str "."]]
253 ,[Plain [Str "$22,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 "$34,000",Str ".",Space,Str "(It",Space,Str "worked",Space,Str "if",Space,Str "\"",Str "lot",Str "\"",Space,Str "is",Space,Str "emphasized",Str ".",Str ")"]]
253 ,[Plain [Str "$22,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 "$34,000",Str ".",Space,Str "(It",Space,Str "worked",Space,Str "if",Space,Str "\"",Str "lot",Str "\"",Space,Str "is",Space,Str "emphasized",Str ".",Str ")"]]
254− ,[Plain [Str "Escaped",Space,Code "$",Str ":",Space,Str "$73",Space,Emph [Str "this",Space,Str "should",Space,Str "be",Space,Str "emphasized"],Space,Str "23$",Str "."]]]
254+ ,[Plain [Str "Escaped",Space,Code ("",[],[]) "$",Str ":",Space,Str "$73",Space,Emph [Str "this",Space,Str "should",Space,Str "be",Space,Str "emphasized"],Space,Str "23$",Str "."]]]
255,Para [Str "Here",Str "'",Str "s",Space,Str "a",Space,Str "LaTeX",Space,Str "table:"]
255,Para [Str "Here",Str "'",Str "s",Space,Str "a",Space,Str "LaTeX",Space,Str "table:"]
256,Para [Str "\\begin{tabular}{|l|l|}\\hline",Space,Str "Animal",Space,Str "&",Space,Str "Number",Space,Str "\\\\",Space,Str "\\hline",Space,Str "Dog",Space,Str "&",Space,Str "2",Space,Str "\\\\",Space,Str "Cat",Space,Str "&",Space,Str "1",Space,Str "\\\\",Space,Str "\\hline",Space,Str "\\end{tabular}"]
256,Para [Str "\\begin{tabular}{|l|l|}\\hline",Space,Str "Animal",Space,Str "&",Space,Str "Number",Space,Str "\\\\",Space,Str "\\hline",Space,Str "Dog",Space,Str "&",Space,Str "2",Space,Str "\\\\",Space,Str "Cat",Space,Str "&",Space,Str "1",Space,Str "\\\\",Space,Str "\\hline",Space,Str "\\end{tabular}"]
257,HorizontalRule
257,HorizontalRule
@@ -322,7 +322,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
322,Plain [Str "An",Space,Str "e",Str "-",Str "mail",Space,Str "address:",Space,Str "nobody",Space,Str "[at]",Space,Str "nowhere",Str ".",Str "net"]
322,Plain [Str "An",Space,Str "e",Str "-",Str "mail",Space,Str "address:",Space,Str "nobody",Space,Str "[at]",Space,Str "nowhere",Str ".",Str "net"]
323,BlockQuote
323,BlockQuote
324 [Para [Str "Blockquoted:",Space,Link [Str "http://example",Str ".",Str "com/"] ("http://example.com/","")]]
324 [Para [Str "Blockquoted:",Space,Link [Str "http://example",Str ".",Str "com/"] ("http://example.com/","")]]
325−,Para [Str "Auto",Str "-",Str "links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code "<http://example.com/>"]
325+,Para [Str "Auto",Str "-",Str "links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code ("",[],[]) "<http://example.com/>"]
326,CodeBlock ("",[],[]) "or here: <http://example.com/>"
326,CodeBlock ("",[],[]) "or here: <http://example.com/>"
327,HorizontalRule
327,HorizontalRule
328,Header 1 [Str "Images"]
328,Header 1 [Str "Images"]
tests/latex-reader.native+10−10
@@ -240,7 +240,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
240,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."]
240,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."]
241,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]]
241,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]]
242,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."]
242,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."]
243−,Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ">",Str ",",Space,Code "$",Str ",",Space,Code "\\",Str ",",Space,Code "\\$",Str ",",Space,Code "<html>",Str "."]
243+,Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ("",[],[]) ">",Str ",",Space,Code ("",[],[]) "$",Str ",",Space,Code ("",[],[]) "\\",Str ",",Space,Code ("",[],[]) "\\$",Str ",",Space,Code ("",[],[]) "<html>",Str "."]
244,Para [Strikeout [Str "This",Space,Str "is",Space,Emph [Str "strikeout"],Str "."]]
244,Para [Strikeout [Str "This",Space,Str "is",Space,Emph [Str "strikeout"],Str "."]]
245,Para [Str "Superscripts:",Space,Str "a",Superscript [Str "bc"],Str "d",Space,Str "a",Superscript [Emph [Str "hello"]],Space,Str "a",Superscript [Str "hello",Space,Str "there"],Str "."]
245,Para [Str "Superscripts:",Space,Str "a",Superscript [Str "bc"],Str "d",Space,Str "a",Superscript [Emph [Str "hello"]],Space,Str "a",Superscript [Str "hello",Space,Str "there"],Str "."]
246,Para [Str "Subscripts:",Space,Str "H",Subscript [Str "2"],Str "O,",Space,Str "H",Subscript [Str "23"],Str "O,",Space,Str "H",Subscript [Str "many",Space,Str "of",Space,Str "them"],Str "O."]
246,Para [Str "Subscripts:",Space,Str "H",Subscript [Str "2"],Str "O,",Space,Str "H",Subscript [Str "23"],Str "O,",Space,Str "H",Subscript [Str "many",Space,Str "of",Space,Str "them"],Str "O."]
@@ -251,7 +251,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
251,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."]
251,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."]
252,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."]]
252,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",Apostrophe,Str "s?"]
254−,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 "."]
254+,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."]
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."]
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 "."]
257,Para [Str "Ellipses",Ellipses,Str "and",Ellipses,Str "and",Ellipses,Str "."]
@@ -269,9 +269,9 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
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 "."]]]
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:"]
270,Para [Str "These",Space,Str "shouldn",Apostrophe,Str "t",Space,Str "be",Space,Str "math:"]
271,BulletList
271,BulletList
272− [[Para [Str "To",Space,Str "get",Space,Str "the",Space,Str "famous",Space,Str "equation,",Space,Str "write",Space,Code "$e = mc^2$",Str "."]]
272+ [[Para [Str "To",Space,Str "get",Space,Str "the",Space,Str "famous",Space,Str "equation,",Space,Str "write",Space,Code ("",[],[]) "$e = mc^2$",Str "."]]
273 ,[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.)"]]
273 ,[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.)"]]
274− ,[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 "."]]]
274+ ,[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",Apostrophe,Str "s",Space,Str "a",Space,Str "LaTeX",Space,Str "table:"]
276,Table [] [AlignLeft,AlignLeft] [0.0,0.0]
276,Table [] [AlignLeft,AlignLeft] [0.0,0.0]
277 [[Plain [Str "Animal"]]
277 [[Plain [Str "Animal"]]
@@ -341,15 +341,15 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
341,Para [Str "Here",Apostrophe,Str "s",Space,Str "an",Space,Link [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),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 "."]
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 "."]
343,Header 2 [Str "Autolinks"]
343,Header 2 [Str "Autolinks"]
344−,Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link [Code "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")]
344+,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","")]
345,BulletList
345,BulletList
346 [[Para [Str "In",Space,Str "a",Space,Str "list?"]]
346 [[Para [Str "In",Space,Str "a",Space,Str "list?"]]
347− ,[Para [Link [Code "http://example.com/"] ("http://example.com/","")]]
347+ ,[Para [Link [Code ("",["url"],[]) "http://example.com/"] ("http://example.com/","")]]
348 ,[Para [Str "It",Space,Str "should."]]]
348 ,[Para [Str "It",Space,Str "should."]]]
349−,Para [Str "An",Space,Str "e",Str "-",Str "mail",Space,Str "address:",Space,Link [Code "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")]
349+,Para [Str "An",Space,Str "e",Str "-",Str "mail",Space,Str "address:",Space,Link [Code ("",[],[]) "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")]
350,BlockQuote
350,BlockQuote
351− [Para [Str "Blockquoted:",Space,Link [Code "http://example.com/"] ("http://example.com/","")]]
351+ [Para [Str "Blockquoted:",Space,Link [Code ("",["url"],[]) "http://example.com/"] ("http://example.com/","")]]
352−,Para [Str "Auto",Str "-",Str "links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code "<http://example.com/>"]
352+,Para [Str "Auto",Str "-",Str "links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code ("",[],[]) "<http://example.com/>"]
353,CodeBlock ("",[],[]) "or here: <http://example.com/>"
353,CodeBlock ("",[],[]) "or here: <http://example.com/>"
354,HorizontalRule
354,HorizontalRule
355,Header 1 [Str "Images"]
355,Header 1 [Str "Images"]
@@ -358,7 +358,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
358,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "image"] ("movie.jpg",""),Space,Str "icon."]
358,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "image"] ("movie.jpg",""),Space,Str "icon."]
359,HorizontalRule
359,HorizontalRule
360,Header 1 [Str "Footnotes"]
360,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",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 "."]]]
362,BlockQuote
362,BlockQuote
363 [Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes.",Note [Para [Str "In",Space,Str "quote."]]]]
363 [Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes.",Note [Para [Str "In",Space,Str "quote."]]]]
364,OrderedList (1,Decimal,Period)
364,OrderedList (1,Decimal,Period)
tests/lhs-test.fragment.html+lhs+1−2
@@ -30,8 +30,7 @@
30 > <br
30 > <br
31 />&gt; <span class="co"
31 />&gt; <span class="co"
32 >-- arr (\op (x,y) -&gt; x `op` y) </span
32 >-- arr (\op (x,y) -&gt; x `op` y) </span
33− ><br
34− /></code
33+ ></code
35 ></pre
34 ></pre
36><p
35><p
37><code
36><code
tests/lhs-test.html+1−2
@@ -57,8 +57,7 @@ pre.sourceCode span.er { color: red; font-weight: bold; }
57 > <br
57 > <br
58 /> <span class="co"
58 /> <span class="co"
59 >-- arr (\op (x,y) -&gt; x `op` y) </span
59 >-- arr (\op (x,y) -&gt; x `op` y) </span
60− ><br
61− /></code
60+ ></code
62 ></pre
61 ></pre
63><p
62><p
64><code
63><code
tests/lhs-test.html+lhs+1−2
@@ -57,8 +57,7 @@ pre.sourceCode span.er { color: red; font-weight: bold; }
57 > <br
57 > <br
58 />&gt; <span class="co"
58 />&gt; <span class="co"
59 >-- arr (\op (x,y) -&gt; x `op` y) </span
59 >-- arr (\op (x,y) -&gt; x `op` y) </span
60− ><br
61− /></code
60+ ></code
62 ></pre
61 ></pre
63><p
62><p
64><code
63><code
tests/lhs-test.native+2−2
@@ -1,7 +1,7 @@
1[Header 1 [Str "lhs",Space,Str "test"]
1[Header 1 [Str "lhs",Space,Str "test"]
2−,Para [Code "unsplit",Space,Str "is",Space,Str "an",Space,Str "arrow",Space,Str "that",Space,Str "takes",Space,Str "a",Space,Str "pair",Space,Str "of",Space,Str "values",Space,Str "and",Space,Str "combines",Space,Str "them",Space,Str "to",Space,Str "return",Space,Str "a",Space,Str "single",Space,Str "value",Str ":"]
2+,Para [Code ("",[],[]) "unsplit",Space,Str "is",Space,Str "an",Space,Str "arrow",Space,Str "that",Space,Str "takes",Space,Str "a",Space,Str "pair",Space,Str "of",Space,Str "values",Space,Str "and",Space,Str "combines",Space,Str "them",Space,Str "to",Space,Str "return",Space,Str "a",Space,Str "single",Space,Str "value",Str ":"]
3,CodeBlock ("",["sourceCode","literate","haskell"],[]) "unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d\nunsplit = arr . uncurry \n -- arr (\\op (x,y) -> x `op` y) "
3,CodeBlock ("",["sourceCode","literate","haskell"],[]) "unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d\nunsplit = arr . uncurry \n -- arr (\\op (x,y) -> x `op` y) "
4−,Para [Code "(***)",Space,Str "combines",Space,Str "two",Space,Str "arrows",Space,Str "into",Space,Str "a",Space,Str "new",Space,Str "arrow",Space,Str "by",Space,Str "running",Space,Str "the",Space,Str "two",Space,Str "arrows",Space,Str "on",Space,Str "a",Space,Str "pair",Space,Str "of",Space,Str "values",Space,Str "(one",Space,Str "arrow",Space,Str "on",Space,Str "the",Space,Str "first",Space,Str "item",Space,Str "of",Space,Str "the",Space,Str "pair",Space,Str "and",Space,Str "one",Space,Str "arrow",Space,Str "on",Space,Str "the",Space,Str "second",Space,Str "item",Space,Str "of",Space,Str "the",Space,Str "pair)",Str "."]
4+,Para [Code ("",[],[]) "(***)",Space,Str "combines",Space,Str "two",Space,Str "arrows",Space,Str "into",Space,Str "a",Space,Str "new",Space,Str "arrow",Space,Str "by",Space,Str "running",Space,Str "the",Space,Str "two",Space,Str "arrows",Space,Str "on",Space,Str "a",Space,Str "pair",Space,Str "of",Space,Str "values",Space,Str "(one",Space,Str "arrow",Space,Str "on",Space,Str "the",Space,Str "first",Space,Str "item",Space,Str "of",Space,Str "the",Space,Str "pair",Space,Str "and",Space,Str "one",Space,Str "arrow",Space,Str "on",Space,Str "the",Space,Str "second",Space,Str "item",Space,Str "of",Space,Str "the",Space,Str "pair)",Str "."]
5,CodeBlock ("",[],[]) "f *** g = first f >>> second g"
5,CodeBlock ("",[],[]) "f *** g = first f >>> second g"
6,Para [Str "Block",Space,Str "quote",Str ":"]
6,Para [Str "Block",Space,Str "quote",Str ":"]
7,BlockQuote
7,BlockQuote
tests/markdown-reader-more.native+5−5
@@ -23,15 +23,15 @@
23,Header 2 [Str "Backslash",Space,Str "newline"]
23,Header 2 [Str "Backslash",Space,Str "newline"]
24,Para [Str "hi",LineBreak,Str "there"]
24,Para [Str "hi",LineBreak,Str "there"]
25,Header 2 [Str "Code",Space,Str "spans"]
25,Header 2 [Str "Code",Space,Str "spans"]
26−,Para [Code "hi\\"]
26+,Para [Code ("",[],[]) "hi\\"]
27−,Para [Code "hi there"]
27+,Para [Code ("",[],[]) "hi there"]
28−,Para [Code "hi````there"]
28+,Para [Code ("",[],[]) "hi````there"]
29,Para [Str "`",Str "hi"]
29,Para [Str "`",Str "hi"]
30,Para [Str "there",Str "`"]
30,Para [Str "there",Str "`"]
31,Header 2 [Str "Multilingual",Space,Str "URLs"]
31,Header 2 [Str "Multilingual",Space,Str "URLs"]
32−,Para [Link [Code "http://\27979.com?\27979=\27979"] ("http://%E6%B5%8B.com?%E6%B5%8B=%E6%B5%8B","")]
32+,Para [Link [Code ("",["url"],[]) "http://\27979.com?\27979=\27979"] ("http://%E6%B5%8B.com?%E6%B5%8B=%E6%B5%8B","")]
33,Para [Link [Str "foo"] ("/bar/%E6%B5%8B?x=%E6%B5%8B","title")]
33,Para [Link [Str "foo"] ("/bar/%E6%B5%8B?x=%E6%B5%8B","title")]
34−,Para [Link [Code "\27979@foo.\27979.baz"] ("mailto:%E6%B5%8B@foo.%E6%B5%8B.baz","")]
34+,Para [Link [Code ("",["url"],[]) "\27979@foo.\27979.baz"] ("mailto:%E6%B5%8B@foo.%E6%B5%8B.baz","")]
35,Header 2 [Str "Numbered",Space,Str "examples"]
35,Header 2 [Str "Numbered",Space,Str "examples"]
36,OrderedList (1,Example,TwoParens)
36,OrderedList (1,Example,TwoParens)
37 [[Plain [Str "First",Space,Str "example",Str "."]]
37 [[Plain [Str "First",Space,Str "example",Str "."]]
tests/rst-reader.native+1−1
@@ -182,7 +182,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ":
182,RawBlock "latex" "\\begin{tabular}{|l|l|}\\hline\nAnimal & Number \\\\ \\hline\nDog & 2 \\\\\nCat & 1 \\\\ \\hline\n\\end{tabular}\n"
182,RawBlock "latex" "\\begin{tabular}{|l|l|}\\hline\nAnimal & Number \\\\ \\hline\nDog & 2 \\\\\nCat & 1 \\\\ \\hline\n\\end{tabular}\n"
183,Header 1 [Str "Inline",Space,Str "Markup"]
183,Header 1 [Str "Inline",Space,Str "Markup"]
184,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ".",Space,Str "This",Space,Str "is",Space,Strong [Str "strong"],Str "."]
184,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ".",Space,Str "This",Space,Str "is",Space,Strong [Str "strong"],Str "."]
185−,Para [Str "This",Space,Str "is",Space,Str "code",Str ":",Space,Code ">",Str ",",Space,Code "$",Str ",",Space,Code "\\",Str ",",Space,Code "\\$",Str ",",Space,Code "<html>",Str "."]
185+,Para [Str "This",Space,Str "is",Space,Str "code",Str ":",Space,Code ("",[],[]) ">",Str ",",Space,Code ("",[],[]) "$",Str ",",Space,Code ("",[],[]) "\\",Str ",",Space,Code ("",[],[]) "\\$",Str ",",Space,Code ("",[],[]) "<html>",Str "."]
186,Para [Str "This",Space,Str "is",Subscript [Str "subscripted"],Space,Str "and",Space,Str "this",Space,Str "is",Space,Superscript [Str "superscripted"],Str "."]
186,Para [Str "This",Space,Str "is",Subscript [Str "subscripted"],Space,Str "and",Space,Str "this",Space,Str "is",Space,Superscript [Str "superscripted"],Str "."]
187,Header 1 [Str "Special",Space,Str "Characters"]
187,Header 1 [Str "Special",Space,Str "Characters"]
188,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "unicode",Str ":"]
188,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "unicode",Str ":"]
tests/testsuite.native+10−10
@@ -276,7 +276,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
276,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word",Str "."]
276,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word",Str "."]
277,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em",Str "."]]]
277,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em",Str "."]]]
278,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word",Str "."]
278,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word",Str "."]
279−,Para [Str "This",Space,Str "is",Space,Str "code",Str ":",Space,Code ">",Str ",",Space,Code "$",Str ",",Space,Code "\\",Str ",",Space,Code "\\$",Str ",",Space,Code "<html>",Str "."]
279+,Para [Str "This",Space,Str "is",Space,Str "code",Str ":",Space,Code ("",[],[]) ">",Str ",",Space,Code ("",[],[]) "$",Str ",",Space,Code ("",[],[]) "\\",Str ",",Space,Code ("",[],[]) "\\$",Str ",",Space,Code ("",[],[]) "<html>",Str "."]
280,Para [Strikeout [Str "This",Space,Str "is",Space,Emph [Str "strikeout"],Str "."]]
280,Para [Strikeout [Str "This",Space,Str "is",Space,Emph [Str "strikeout"],Str "."]]
281,Para [Str "Superscripts",Str ":",Space,Str "a",Superscript [Str "bc"],Str "d",Space,Str "a",Superscript [Emph [Str "hello"]],Space,Str "a",Superscript [Str "hello",Str "\160",Str "there"],Str "."]
281,Para [Str "Superscripts",Str ":",Space,Str "a",Superscript [Str "bc"],Str "d",Space,Str "a",Superscript [Emph [Str "hello"]],Space,Str "a",Superscript [Str "hello",Str "\160",Str "there"],Str "."]
282,Para [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",Str "\160",Str "of",Str "\160",Str "them"],Str "O",Str "."]
282,Para [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",Str "\160",Str "of",Str "\160",Str "them"],Str "O",Str "."]
@@ -287,7 +287,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
287,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 "."]
287,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 "."]
288,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 "."]]
288,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",Apostrophe,Str "s",Str "?"]
290−,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 "."]
290+,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 "."]
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 "."]
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 "."]
293,Para [Str "Ellipses",Ellipses,Str "and",Ellipses,Str "and",Ellipses,Str "."]
@@ -304,10 +304,10 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
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 "."]]]
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 ":"]
305,Para [Str "These",Space,Str "shouldn",Apostrophe,Str "t",Space,Str "be",Space,Str "math",Str ":"]
306,BulletList
306,BulletList
307− [[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 "."]]
307+ [[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 "."]]
308 ,[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 ")"]]
308 ,[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 ")"]]
309 ,[Plain [Str "Shoes",Space,Str "(",Str "$",Str "20",Str ")",Space,Str "and",Space,Str "socks",Space,Str "(",Str "$",Str "5",Str ")",Str "."]]
309 ,[Plain [Str "Shoes",Space,Str "(",Str "$",Str "20",Str ")",Space,Str "and",Space,Str "socks",Space,Str "(",Str "$",Str "5",Str ")",Str "."]]
310− ,[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 "."]]]
310+ ,[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",Apostrophe,Str "s",Space,Str "a",Space,Str "LaTeX",Space,Str "table",Str ":"]
312,RawBlock "latex" "\\begin{tabular}{|l|l|}\\hline\nAnimal & Number \\\\ \\hline\nDog & 2 \\\\\nCat & 1 \\\\ \\hline\n\\end{tabular}"
312,RawBlock "latex" "\\begin{tabular}{|l|l|}\\hline\nAnimal & Number \\\\ \\hline\nDog & 2 \\\\\nCat & 1 \\\\ \\hline\n\\end{tabular}"
313,HorizontalRule
313,HorizontalRule
@@ -371,15 +371,15 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
371,Para [Str "Here",Apostrophe,Str "s",Space,Str "an",Space,Link [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),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 "."]
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 "."]
373,Header 2 [Str "Autolinks"]
373,Header 2 [Str "Autolinks"]
374−,Para [Str "With",Space,Str "an",Space,Str "ampersand",Str ":",Space,Link [Code "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")]
374+,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","")]
375,BulletList
375,BulletList
376 [[Plain [Str "In",Space,Str "a",Space,Str "list",Str "?"]]
376 [[Plain [Str "In",Space,Str "a",Space,Str "list",Str "?"]]
377− ,[Plain [Link [Code "http://example.com/"] ("http://example.com/","")]]
377+ ,[Plain [Link [Code ("",["url"],[]) "http://example.com/"] ("http://example.com/","")]]
378 ,[Plain [Str "It",Space,Str "should",Str "."]]]
378 ,[Plain [Str "It",Space,Str "should",Str "."]]]
379−,Para [Str "An",Space,Str "e",Str "-",Str "mail",Space,Str "address",Str ":",Space,Link [Code "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")]
379+,Para [Str "An",Space,Str "e",Str "-",Str "mail",Space,Str "address",Str ":",Space,Link [Code ("",["url"],[]) "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")]
380,BlockQuote
380,BlockQuote
381− [Para [Str "Blockquoted",Str ":",Space,Link [Code "http://example.com/"] ("http://example.com/","")]]
381+ [Para [Str "Blockquoted",Str ":",Space,Link [Code ("",["url"],[]) "http://example.com/"] ("http://example.com/","")]]
382−,Para [Str "Auto",Str "-",Str "links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here",Str ":",Space,Code "<http://example.com/>"]
382+,Para [Str "Auto",Str "-",Str "links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here",Str ":",Space,Code ("",[],[]) "<http://example.com/>"]
383,CodeBlock ("",[],[]) "or here: <http://example.com/>"
383,CodeBlock ("",[],[]) "or here: <http://example.com/>"
384,HorizontalRule
384,HorizontalRule
385,Header 1 [Str "Images"]
385,Header 1 [Str "Images"]
@@ -388,7 +388,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
388,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "movie"] ("movie.jpg",""),Space,Str "icon",Str "."]
388,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "movie"] ("movie.jpg",""),Space,Str "icon",Str "."]
389,HorizontalRule
389,HorizontalRule
390,Header 1 [Str "Footnotes"]
390,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",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 "."]]]
392,BlockQuote
392,BlockQuote
393 [Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes",Str ".",Note [Para [Str "In",Space,Str "quote",Str "."]]]]
393 [Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes",Str ".",Note [Para [Str "In",Space,Str "quote",Str "."]]]]
394,OrderedList (1,Decimal,Period)
394,OrderedList (1,Decimal,Period)
tests/textile-reader.native+1−1
@@ -26,7 +26,7 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
26,Para [Str "And",Str ":"]
26,Para [Str "And",Str ":"]
27,CodeBlock ("",[],[]) " this code block is indented by two tabs\n\n These should not be escaped: \\$ \\\\ \\> \\[ \\{"
27,CodeBlock ("",[],[]) " this code block is indented by two tabs\n\n These should not be escaped: \\$ \\\\ \\> \\[ \\{"
28,CodeBlock ("",[],[]) "Code block with .bc\n continued\n @</\\\n"
28,CodeBlock ("",[],[]) "Code block with .bc\n continued\n @</\\\n"
29−,Para [Str "Inline",Space,Str "code",Str ":",Space,Code "<tt>",Str ",",Space,Code "@",Str "."]
29+,Para [Str "Inline",Space,Str "code",Str ":",Space,Code ("",[],[]) "<tt>",Str ",",Space,Code ("",[],[]) "@",Str "."]
30,Header 1 [Str "Lists"]
30,Header 1 [Str "Lists"]
31,Header 2 [Str "Unordered"]
31,Header 2 [Str "Unordered"]
32,Para [Str "Asterisks",Space,Str "tight",Str ":"]
32,Para [Str "Asterisks",Space,Str "tight",Str ":"]
tests/writer.html+3−3
@@ -1024,7 +1024,7 @@ document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'">'+'Email link'+'<\/'+'a'+'>')
1024>Autolinks</h2
1024>Autolinks</h2
1025><p
1025><p
1026>With an ampersand: <a href="http://example.com/?foo=1&amp;bar=2"
1026>With an ampersand: <a href="http://example.com/?foo=1&amp;bar=2"
1027− ><code
1027+ ><code class="url"
1028 >http://example.com/?foo=1&amp;bar=2</code
1028 >http://example.com/?foo=1&amp;bar=2</code
1029 ></a
1029 ></a
1030 ></p
1030 ></p
@@ -1033,7 +1033,7 @@ document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'">'+'Email link'+'<\/'+'a'+'>')
1033 >In a list?</li
1033 >In a list?</li
1034 ><li
1034 ><li
1035 ><a href="http://example.com/"
1035 ><a href="http://example.com/"
1036− ><code
1036+ ><code class="url"
1037 >http://example.com/</code
1037 >http://example.com/</code
1038 ></a
1038 ></a
1039 ></li
1039 ></li
@@ -1054,7 +1054,7 @@ document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'">'+'<code>'+e+'</code>'+'<\/'+
1054><blockquote
1054><blockquote
1055><p
1055><p
1056 >Blockquoted: <a href="http://example.com/"
1056 >Blockquoted: <a href="http://example.com/"
1057− ><code
1057+ ><code class="url"
1058 >http://example.com/</code
1058 >http://example.com/</code
1059 ></a
1059 ></a
1060 ></p
1060 ></p
tests/writer.native+10−10
@@ -276,7 +276,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
276,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word",Str "."]
276,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word",Str "."]
277,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em",Str "."]]]
277,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em",Str "."]]]
278,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word",Str "."]
278,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word",Str "."]
279−,Para [Str "This",Space,Str "is",Space,Str "code",Str ":",Space,Code ">",Str ",",Space,Code "$",Str ",",Space,Code "\\",Str ",",Space,Code "\\$",Str ",",Space,Code "<html>",Str "."]
279+,Para [Str "This",Space,Str "is",Space,Str "code",Str ":",Space,Code ("",[],[]) ">",Str ",",Space,Code ("",[],[]) "$",Str ",",Space,Code ("",[],[]) "\\",Str ",",Space,Code ("",[],[]) "\\$",Str ",",Space,Code ("",[],[]) "<html>",Str "."]
280,Para [Strikeout [Str "This",Space,Str "is",Space,Emph [Str "strikeout"],Str "."]]
280,Para [Strikeout [Str "This",Space,Str "is",Space,Emph [Str "strikeout"],Str "."]]
281,Para [Str "Superscripts",Str ":",Space,Str "a",Superscript [Str "bc"],Str "d",Space,Str "a",Superscript [Emph [Str "hello"]],Space,Str "a",Superscript [Str "hello",Str "\160",Str "there"],Str "."]
281,Para [Str "Superscripts",Str ":",Space,Str "a",Superscript [Str "bc"],Str "d",Space,Str "a",Superscript [Emph [Str "hello"]],Space,Str "a",Superscript [Str "hello",Str "\160",Str "there"],Str "."]
282,Para [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",Str "\160",Str "of",Str "\160",Str "them"],Str "O",Str "."]
282,Para [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",Str "\160",Str "of",Str "\160",Str "them"],Str "O",Str "."]
@@ -287,7 +287,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
287,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 "."]
287,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 "."]
288,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 "."]]
288,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",Apostrophe,Str "s",Str "?"]
290−,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 "."]
290+,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 "."]
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 "."]
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 "."]
293,Para [Str "Ellipses",Ellipses,Str "and",Ellipses,Str "and",Ellipses,Str "."]
@@ -304,10 +304,10 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
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 "."]]]
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 ":"]
305,Para [Str "These",Space,Str "shouldn",Apostrophe,Str "t",Space,Str "be",Space,Str "math",Str ":"]
306,BulletList
306,BulletList
307− [[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 "."]]
307+ [[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 "."]]
308 ,[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 ")"]]
308 ,[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 ")"]]
309 ,[Plain [Str "Shoes",Space,Str "(",Str "$",Str "20",Str ")",Space,Str "and",Space,Str "socks",Space,Str "(",Str "$",Str "5",Str ")",Str "."]]
309 ,[Plain [Str "Shoes",Space,Str "(",Str "$",Str "20",Str ")",Space,Str "and",Space,Str "socks",Space,Str "(",Str "$",Str "5",Str ")",Str "."]]
310− ,[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 "."]]]
310+ ,[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",Apostrophe,Str "s",Space,Str "a",Space,Str "LaTeX",Space,Str "table",Str ":"]
312,RawBlock "latex" "\\begin{tabular}{|l|l|}\\hline\nAnimal & Number \\\\ \\hline\nDog & 2 \\\\\nCat & 1 \\\\ \\hline\n\\end{tabular}"
312,RawBlock "latex" "\\begin{tabular}{|l|l|}\\hline\nAnimal & Number \\\\ \\hline\nDog & 2 \\\\\nCat & 1 \\\\ \\hline\n\\end{tabular}"
313,HorizontalRule
313,HorizontalRule
@@ -371,15 +371,15 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
371,Para [Str "Here",Apostrophe,Str "s",Space,Str "an",Space,Link [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),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 "."]
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 "."]
373,Header 2 [Str "Autolinks"]
373,Header 2 [Str "Autolinks"]
374−,Para [Str "With",Space,Str "an",Space,Str "ampersand",Str ":",Space,Link [Code "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")]
374+,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","")]
375,BulletList
375,BulletList
376 [[Plain [Str "In",Space,Str "a",Space,Str "list",Str "?"]]
376 [[Plain [Str "In",Space,Str "a",Space,Str "list",Str "?"]]
377− ,[Plain [Link [Code "http://example.com/"] ("http://example.com/","")]]
377+ ,[Plain [Link [Code ("",["url"],[]) "http://example.com/"] ("http://example.com/","")]]
378 ,[Plain [Str "It",Space,Str "should",Str "."]]]
378 ,[Plain [Str "It",Space,Str "should",Str "."]]]
379−,Para [Str "An",Space,Str "e",Str "-",Str "mail",Space,Str "address",Str ":",Space,Link [Code "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")]
379+,Para [Str "An",Space,Str "e",Str "-",Str "mail",Space,Str "address",Str ":",Space,Link [Code ("",["url"],[]) "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")]
380,BlockQuote
380,BlockQuote
381− [Para [Str "Blockquoted",Str ":",Space,Link [Code "http://example.com/"] ("http://example.com/","")]]
381+ [Para [Str "Blockquoted",Str ":",Space,Link [Code ("",["url"],[]) "http://example.com/"] ("http://example.com/","")]]
382−,Para [Str "Auto",Str "-",Str "links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here",Str ":",Space,Code "<http://example.com/>"]
382+,Para [Str "Auto",Str "-",Str "links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here",Str ":",Space,Code ("",[],[]) "<http://example.com/>"]
383,CodeBlock ("",[],[]) "or here: <http://example.com/>"
383,CodeBlock ("",[],[]) "or here: <http://example.com/>"
384,HorizontalRule
384,HorizontalRule
385,Header 1 [Str "Images"]
385,Header 1 [Str "Images"]
@@ -388,7 +388,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA
388,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "movie"] ("movie.jpg",""),Space,Str "icon",Str "."]
388,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "movie"] ("movie.jpg",""),Space,Str "icon",Str "."]
389,HorizontalRule
389,HorizontalRule
390,Header 1 [Str "Footnotes"]
390,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",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 "."]]]
392,BlockQuote
392,BlockQuote
393 [Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes",Str ".",Note [Para [Str "In",Space,Str "quote",Str "."]]]]
393 [Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes",Str ".",Note [Para [Str "In",Space,Str "quote",Str "."]]]]
394,OrderedList (1,Decimal,Period)
394,OrderedList (1,Decimal,Period)