git.iko.soy/typeable/pandoc
on master help sign in
LaTeX reader: add support for `nolinkurl` command. (#4992)
7eea5c6Brian Leung
src/Text/Pandoc/Readers/LaTeX.hs+2
@@ -988,6 +988,8 @@ inlineCommands = M.union inlineLanguageCommands $ M.fromList
988 , ("Verb", doverb)
988 , ("Verb", doverb)
989 , ("url", ((unescapeURL . T.unpack . untokenize) <$> bracedUrl) >>= \url ->
989 , ("url", ((unescapeURL . T.unpack . untokenize) <$> bracedUrl) >>= \url ->
990 pure (link url "" (str url)))
990 pure (link url "" (str url)))
991+ , ("nolinkurl", ((unescapeURL . T.unpack . untokenize) <$> bracedUrl) >>= \url ->
992+ pure (code url))
991 , ("href", (unescapeURL . toksToString <$>
993 , ("href", (unescapeURL . toksToString <$>
992 bracedUrl <* optional sp) >>= \url ->
994 bracedUrl <* optional sp) >>= \url ->
993 tok >>= \lab -> pure (link url "" lab))
995 tok >>= \lab -> pure (link url "" lab))
test/command/4306.mdnew file+10
@@ -0,0 +1,10 @@
1+```
2+pandoc -f latex -t native
3+\documentclass{article}
4+\usepackage{hyperref}
5+\begin{document}
6+The file id is \nolinkurl{ESP_123_5235}.
7+\end{document}
8+^D
9+[Para [Str "The",Space,Str "file",Space,Str "id",Space,Str "is",Space,Code ("",[],[]) "ESP_123_5235",Str "."]]
10+```