Ms writer: improved internal links.

This commit is contained in:
John MacFarlane 2017-03-26 10:09:41 +02:00
parent c44ad0710a
commit a5ec298989

View file

@ -480,8 +480,9 @@ inlineToMs opts (Link _ txt ('#':ident, _)) = do
-- internal link
contents <- inlineListToMs' opts{ writerWrapText = WrapNone } txt
return $ text "\\c" <> cr <> nowrap (text ".pdfhref L -D " <>
doubleQuotes (text ident) <> space <>
doubleQuotes contents) <> cr
doubleQuotes (text ident) <> text " -A " <>
doubleQuotes (text "\\c") <> text " -- " <> contents) <>
cr <> text "\\&"
inlineToMs opts (Link _ txt (src, _)) = do
let srcSuffix = fromMaybe src (stripPrefix "mailto:" src)
inNote <- gets stInNote