Skip to content

Commit

Permalink
LaTeX reader: add support for nolinkurl command. (#4992)
Browse files Browse the repository at this point in the history
  • Loading branch information
leungbk authored and jgm committed Oct 23, 2018
1 parent 19e0fcb commit 7eea5c6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Text/Pandoc/Readers/LaTeX.hs
Expand Up @@ -988,6 +988,8 @@ inlineCommands = M.union inlineLanguageCommands $ M.fromList
, ("Verb", doverb)
, ("url", ((unescapeURL . T.unpack . untokenize) <$> bracedUrl) >>= \url ->
pure (link url "" (str url)))
, ("nolinkurl", ((unescapeURL . T.unpack . untokenize) <$> bracedUrl) >>= \url ->
pure (code url))
, ("href", (unescapeURL . toksToString <$>
bracedUrl <* optional sp) >>= \url ->
tok >>= \lab -> pure (link url "" lab))
Expand Down
10 changes: 10 additions & 0 deletions test/command/4306.md
@@ -0,0 +1,10 @@
```
pandoc -f latex -t native
\documentclass{article}
\usepackage{hyperref}
\begin{document}
The file id is \nolinkurl{ESP_123_5235}.
\end{document}
^D
[Para [Str "The",Space,Str "file",Space,Str "id",Space,Str "is",Space,Code ("",[],[]) "ESP_123_5235",Str "."]]
```

0 comments on commit 7eea5c6

Please sign in to comment.