Man writer: omit internal links.

That is, just print the link text without the url.

Closes #4136.
This commit is contained in:
John MacFarlane 2017-12-09 14:09:00 -08:00
parent bd1713a21b
commit 544494d0e2

View file

@ -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)