From 2e20129903d9420d677a6304212f09a1f99a080b Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 25 Mar 2017 10:35:05 +0100 Subject: Ms. writer: links: use footnote only for absolute URIs. --- src/Text/Pandoc/Writers/Ms.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Writers/Ms.hs b/src/Text/Pandoc/Writers/Ms.hs index 438282437..6e8c1bd63 100644 --- a/src/Text/Pandoc/Writers/Ms.hs +++ b/src/Text/Pandoc/Writers/Ms.hs @@ -71,6 +71,7 @@ import Control.Monad.State import Data.Char ( isLower, isUpper, toUpper ) import Text.TeXMath (writeEqn) import System.FilePath (takeExtension) +import Network.URI (isURI) data WriterState = WriterState { stHasInlineMath :: Bool , stFirstPara :: Bool @@ -477,7 +478,8 @@ inlineToMs opts (Link _ txt (src, _)) = do [Str s] | escapeURI s == srcSuffix -> return $ text (escapeString srcSuffix) - _ | inNote -> do + _ | not (isURI src) -> inlineListToMs opts txt + | inNote -> do -- avoid a note in a note! contents <- inlineListToMs opts txt return $ contents <> space <> char '(' <> -- cgit v1.2.3