Skip to content

Commit 2ee7752

Browse files
committed
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
1 parent 1874558 commit 2ee7752

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Text/Pandoc/Readers/Docx/Reducible.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

0 commit comments

Comments
 (0)