aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 '}')