diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-12-09 14:09:00 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-12-09 14:09:00 -0800 |
commit | 544494d0e234e899a45f02b185cf5a448787f786 (patch) | |
tree | d52a0f09226788677d64fd2627059eb87f4eeea8 | |
parent | bd1713a21b7ea8fc3e6020d4289ff2d6c4b6f5f9 (diff) | |
download | pandoc-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.hs | 2 |
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) |