aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-08-03 22:44:47 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-08-03 22:44:47 +0000
commit22a65385571737b6232debac884184d6504222fc (patch)
tree1c40fa5ecda7cdf3d66607df005c93a2aa0c5550 /src/Text/Pandoc/Readers
parent271c3f987e468b77ac9209e9efe3bbaa51717039 (diff)
downloadpandoc-22a65385571737b6232debac884184d6504222fc.tar.gz
Added parsing for \url to LaTeX reader.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@833 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index d76a4b2ac..77ed4607a 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -405,7 +405,7 @@ inline = choice [ strong, emph, strikeout, superscript, subscript,
accentedChar, specialChar, specialInline, escapedChar,
unescapedChar, str, endline, whitespace ] <?> "inline"
-specialInline = choice [ link, image, footnote, rawLaTeXInline ]
+specialInline = choice [ url, link, image, footnote, rawLaTeXInline ]
<?> "link, raw TeX, note, or image"
accentedChar = normalAccentedChar <|> specialAccentedChar
@@ -654,6 +654,11 @@ math2 = try (do
-- links and images
--
+url = try (do
+ string "\\url"
+ url <- charsInBalanced '{' '}'
+ return (Link [Code url] (url, "")))
+
link = try (do
string "\\href{"
url <- manyTill anyChar (char '}')