aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-02-26 22:01:47 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-02-26 22:01:47 -0800
commit3fca434737f0eee706c02fba6a2a2629338a1065 (patch)
treeba9b757026450afb9a831cb54d06bfec520951e0 /src/Text
parentcaed0df4a7ed5b2ec0cc2b15cc99e359987982e4 (diff)
downloadpandoc-3fca434737f0eee706c02fba6a2a2629338a1065.tar.gz
Changed style names in reference docx.
FootnoteReference -> FootnoteRef. Hyperlink -> Link. Why? Because the old names got changed by Word when the reference.docx was edited. I don't understand why, but this fixes things. Closes #414.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/Docx.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs
index c3148aae4..39b5a716d 100644
--- a/src/Text/Pandoc/Writers/Docx.hs
+++ b/src/Text/Pandoc/Writers/Docx.hs
@@ -655,7 +655,7 @@ inlineToOpenXML opts (Note bs) = do
notes <- gets stFootnotes
notenum <- getUniqueId
let notemarker = mknode "w:r" []
- [ mknode "w:rPr" [] (rStyle "FootnoteReference")
+ [ mknode "w:rPr" [] (rStyle "FootnoteRef")
, mknode "w:footnoteRef" [] () ]
let notemarkerXml = RawInline "openxml" $ ppElement notemarker
let insertNoteRef (Plain ils : xs) = Plain (notemarkerXml : ils) : xs
@@ -672,15 +672,15 @@ inlineToOpenXML opts (Note bs) = do
let newnote = mknode "w:footnote" [("w:id", notenum)] $ contents
modify $ \s -> s{ stFootnotes = newnote : notes }
return [ mknode "w:r" []
- [ mknode "w:rPr" [] (rStyle "FootnoteReference")
+ [ mknode "w:rPr" [] (rStyle "FootnoteRef")
, mknode "w:footnoteReference" [("w:id", notenum)] () ] ]
-- internal link:
inlineToOpenXML opts (Link txt ('#':xs,_)) = do
- contents <- withTextProp (rStyle "Hyperlink") $ inlinesToOpenXML opts txt
+ contents <- withTextProp (rStyle "Link") $ inlinesToOpenXML opts txt
return [ mknode "w:hyperlink" [("w:anchor",xs)] contents ]
-- external link:
inlineToOpenXML opts (Link txt (src,_)) = do
- contents <- withTextProp (rStyle "Hyperlink") $ inlinesToOpenXML opts txt
+ contents <- withTextProp (rStyle "Link") $ inlinesToOpenXML opts txt
extlinks <- gets stExternalLinks
id' <- case M.lookup src extlinks of
Just i -> return i