git.iko.soy/typeable/pandoc
on master help sign in
LaTeX reader: Added a 'try' in rawLaTeXBlock.
1038606John MacFarlane
src/Text/Pandoc/Readers/LaTeX.hs+1−1
@@ -713,7 +713,7 @@ verbatimEnv = do
713 return (r,rest)
713 return (r,rest)
714
714
715rawLaTeXBlock :: Parser [Char] ParserState String
715rawLaTeXBlock :: Parser [Char] ParserState String
716−rawLaTeXBlock = snd <$> withRaw (environment <|> blockCommand)
716+rawLaTeXBlock = snd <$> try (withRaw (environment <|> blockCommand))
717
717
718rawLaTeXInline :: Parser [Char] ParserState Inline
718rawLaTeXInline :: Parser [Char] ParserState Inline
719rawLaTeXInline = do
719rawLaTeXInline = do
tests/Tests/Readers/Markdown.hs+4
@@ -44,6 +44,10 @@ tests = [ testGroup "inline code"
44 "`*` {.haskell .special x=\"7\"}"
44 "`*` {.haskell .special x=\"7\"}"
45 =?> para (codeWith ("",["haskell","special"],[("x","7")]) "*")
45 =?> para (codeWith ("",["haskell","special"],[("x","7")]) "*")
46 ]
46 ]
47+ , testGroup "raw LaTeX"
48+ [ "in URL" =:
49+ "\\begin\n" =?> para (text "\\begin")
50+ ]
47 , testGroup "backslash escapes"
51 , testGroup "backslash escapes"
48 [ "in URL" =:
52 [ "in URL" =:
49 "[hi](/there\\))"
53 "[hi](/there\\))"