aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-10-28 23:30:29 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-10-28 23:30:29 +0000
commit63dfc3abf274bc4fb85b43c1e1a74e9baf18bc77 (patch)
tree815fb115c03ac17fb2e422dbedb312fce81a51dd
parent27ea29a906616fabf62754181af9fd1f2dd7c1f4 (diff)
downloadpandoc-63dfc3abf274bc4fb85b43c1e1a74e9baf18bc77.tar.gz
Modified specialChar in LaTeX reader so that '"'
characters are parsed and do not cause an error. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1056 788f1e2b-df1e-0410-8736-df70ead52e1b
-rw-r--r--debian/changelog2
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs4
2 files changed, 5 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 50f82d033..61471cbcf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -40,6 +40,8 @@ pandoc (0.45) unstable; urgency=low
+ Parse fields associated with '.. image::' blocks, and use 'alt'
field, if given, for image alt and title attributes.
+ * LaTeX reader: Modified specialChar so that '"' characters are parsed.
+
* HTML writer: Don't produce HTML for table of contents if there are
no headers. (This would be an empty list, which is invalid XHTML.)
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index 77c642e7e..37cc2bfe4 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -494,7 +494,7 @@ escapedChar = do
-- ignore standalone, nonescaped special characters
unescapedChar = oneOf "`$^&_#{}|<>" >> return (Str "")
-specialChar = choice [ backslash, tilde, caret, bar, lt, gt ]
+specialChar = choice [ backslash, tilde, caret, bar, lt, gt, doubleQuote ]
backslash = try (string "\\textbackslash") >> return (Str "\\")
@@ -508,6 +508,8 @@ lt = try (string "\\textless") >> return (Str "<")
gt = try (string "\\textgreater") >> return (Str ">")
+doubleQuote = char '"' >> return (Str "\"")
+
code = code1 <|> code2
code1 = try $ do