git.iko.soy/typeable/pandoc
on master help sign in
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

commit2ee7752d147c96e42c91cd621595776600f8c81d authorJesse Rosenthal <jrosenthal@jhu.edu> dateTue 2 Feb 2016, 14:40 (11 years ago) parent1874558
1 file changed+2
src/Text/Pandoc/Readers/Docx/Reducible.hs+2
src/Text/Pandoc/Readers/Docx/Reducible.hs+2
@@ -53,6 +53,7 @@ instance Modifiable Inlines where
5353 (Strikeout _) -> Modifier strikeout
5454 (Superscript _) -> Modifier superscript
5555 (Subscript _) -> Modifier subscript
56+ (Link attr _ tgt) -> Modifier $ linkWith attr (fst tgt) (snd tgt)
5657 (Span attr _) -> AttrModifier spanWith attr
5758 _ -> NullModifier
5859 _ -> NullModifier
@@ -65,6 +66,7 @@ instance Modifiable Inlines where
6566 (Strikeout lst) -> fromList lst
6667 (Superscript lst) -> fromList lst
6768 (Subscript lst) -> fromList lst
69+ (Link _ lst _) -> fromList lst
6870 (Span _ lst) -> fromList lst
6971 _ -> ils
7072 _ -> ils