From 492804591573378b6e03a7ac2fd28177c2f74b64 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Thu, 11 Oct 2007 22:54:01 +0000 Subject: [PATCH] Man writer: Don't print link source for internal links (#...). git-svn-id: https://pandoc.googlecode.com/svn/trunk@1047 788f1e2b-df1e-0410-8736-df70ead52e1b --- debian/changelog | 2 ++ src/Text/Pandoc/Writers/Man.hs | 1 + 2 files changed, 3 insertions(+) diff --git a/debian/changelog b/debian/changelog index 1a73a93c5..a37793d60 100644 --- a/debian/changelog +++ b/debian/changelog @@ -68,6 +68,8 @@ pandoc (0.45) unstable; urgency=low + If label for a link reference contains a colon, surround it by ` signs so it won't be interpreted as the end of the link label. + * Man writer: Don't print link source for internal links (#...). + * Main.hs (tabFilter): Treat '\r' at end of line as newline (in addition to "\r\n" and '\n'). diff --git a/src/Text/Pandoc/Writers/Man.hs b/src/Text/Pandoc/Writers/Man.hs index 8e14c2bf0..27c6d9a89 100644 --- a/src/Text/Pandoc/Writers/Man.hs +++ b/src/Text/Pandoc/Writers/Man.hs @@ -272,6 +272,7 @@ inlineToMan opts (TeX str) = return $ text $ escapeCode str inlineToMan opts (HtmlInline str) = return $ text $ escapeCode str inlineToMan opts (LineBreak) = return $ text "\n.PD 0\n.P\n.PD\n" inlineToMan opts Space = return $ char ' ' +inlineToMan opts (Link txt (('#':_), _)) = inlineListToMan opts txt inlineToMan opts (Link txt (src, _)) = do linktext <- inlineListToMan opts txt let srcSuffix = if isPrefixOf "mailto:" src then drop 7 src else src