aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-12-09 14:09:00 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2017-12-09 14:09:00 -0800
commit544494d0e234e899a45f02b185cf5a448787f786 (patch)
treed52a0f09226788677d64fd2627059eb87f4eeea8
parentbd1713a21b7ea8fc3e6020d4289ff2d6c4b6f5f9 (diff)
downloadpandoc-544494d0e234e899a45f02b185cf5a448787f786.tar.gz
Man writer: omit internal links.
That is, just print the link text without the url. Closes #4136.
-rw-r--r--src/Text/Pandoc/Writers/Man.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/Man.hs b/src/Text/Pandoc/Writers/Man.hs
index ad3de41eb..34b5c0ece 100644
--- a/src/Text/Pandoc/Writers/Man.hs
+++ b/src/Text/Pandoc/Writers/Man.hs
@@ -373,6 +373,8 @@ inlineToMan _ LineBreak = return $
cr <> text ".PD 0" $$ text ".P" $$ text ".PD" <> cr
inlineToMan _ SoftBreak = return space
inlineToMan _ Space = return space
+inlineToMan opts (Link _ txt ('#':_, _)) =
+ inlineListToMan opts txt -- skip internal links
inlineToMan opts (Link _ txt (src, _)) = do
linktext <- inlineListToMan opts txt
let srcSuffix = fromMaybe src (stripPrefix "mailto:" src)