From c74c5fdd97e8bf4c160a42dff72e3a521294bcda Mon Sep 17 00:00:00 2001
From: Hubert Plociniczak <hubert.plociniczak@gmail.com>
Date: Tue, 18 Oct 2016 10:50:37 +0200
Subject: Issue 3143: Don't duplicate text for anchors

When creating an anchor element we were adding its representation
as well as the original content, leading to text duplication.
---
 src/Text/Pandoc/Readers/Odt/ContentReader.hs | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'src')

diff --git a/src/Text/Pandoc/Readers/Odt/ContentReader.hs b/src/Text/Pandoc/Readers/Odt/ContentReader.hs
index 8c475eefc..ffd2f61d1 100644
--- a/src/Text/Pandoc/Readers/Odt/ContentReader.hs
+++ b/src/Text/Pandoc/Readers/Odt/ContentReader.hs
@@ -713,9 +713,8 @@ maybeAddAnchorFrom anchorReader =
   >>>
   proc (inlines, fAnchorElem) -> do
   case fAnchorElem of
-    Right anchorElem ->
-      arr (anchorElem <>) -<< inlines
-    Left _ -> returnA -< inlines
+    Right anchorElem -> returnA -< anchorElem
+    Left _           -> returnA -< inlines
   where
     toAnchorElem :: Anchor -> Inlines
     toAnchorElem anchorID = spanWith (anchorID, [], []) mempty
-- 
cgit v1.2.3