aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-03-25 10:35:05 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-03-25 10:35:05 +0100
commit2e20129903d9420d677a6304212f09a1f99a080b (patch)
tree1b9cbcd901df5f4625bf08c23ca02fbbfdaac8cc /src/Text
parent980cc50aff06c3181cc7ddc53cbe726470a692f4 (diff)
downloadpandoc-2e20129903d9420d677a6304212f09a1f99a080b.tar.gz
Ms. writer: links: use footnote only for absolute URIs.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/Ms.hs4
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 '(' <>