aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2016-02-02 14:40:09 -0500
committerJesse Rosenthal <jrosenthal@jhu.edu>2016-02-02 14:40:09 -0500
commit2ee7752d147c96e42c91cd621595776600f8c81d (patch)
treeac22ddd5e9406886b85ce6ddc6fdd635734b4c48 /src/Text/Pandoc
parent18745585c1300cb5a900f06c854068961fa38d3e (diff)
downloadpandoc-2ee7752d147c96e42c91cd621595776600f8c81d.tar.gz
Docx reader: Add a "Link" modifier to Reducible
We want to make sure that links have their spaces removed, and are appropriately smushed together. This closes #2689
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/Docx/Reducible.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Docx/Reducible.hs b/src/Text/Pandoc/Readers/Docx/Reducible.hs
index c93b40119..e6de2d474 100644
--- a/src/Text/Pandoc/Readers/Docx/Reducible.hs
+++ b/src/Text/Pandoc/Readers/Docx/Reducible.hs
@@ -53,6 +53,7 @@ instance Modifiable Inlines where
(Strikeout _) -> Modifier strikeout
(Superscript _) -> Modifier superscript
(Subscript _) -> Modifier subscript
+ (Link attr _ tgt) -> Modifier $ linkWith attr (fst tgt) (snd tgt)
(Span attr _) -> AttrModifier spanWith attr
_ -> NullModifier
_ -> NullModifier
@@ -65,6 +66,7 @@ instance Modifiable Inlines where
(Strikeout lst) -> fromList lst
(Superscript lst) -> fromList lst
(Subscript lst) -> fromList lst
+ (Link _ lst _) -> fromList lst
(Span _ lst) -> fromList lst
_ -> ils
_ -> ils