diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-03-25 10:35:05 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-03-25 10:35:05 +0100 |
commit | 2e20129903d9420d677a6304212f09a1f99a080b (patch) | |
tree | 1b9cbcd901df5f4625bf08c23ca02fbbfdaac8cc /src/Text/Pandoc | |
parent | 980cc50aff06c3181cc7ddc53cbe726470a692f4 (diff) | |
download | pandoc-2e20129903d9420d677a6304212f09a1f99a080b.tar.gz |
Ms. writer: links: use footnote only for absolute URIs.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/Ms.hs | 4 |
1 files changed, 3 insertions, 1 deletions
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 '(' <> |