From 22a65385571737b6232debac884184d6504222fc Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Fri, 3 Aug 2007 22:44:47 +0000 Subject: Added parsing for \url to LaTeX reader. git-svn-id: https://pandoc.googlecode.com/svn/trunk@833 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Readers/LaTeX.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc/Readers') 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 '}') -- cgit v1.2.3