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.
This commit is contained in:
parent
cbeb72d06b
commit
c74c5fdd97
3 changed files with 3 additions and 4 deletions
|
@ -713,8 +713,7 @@ maybeAddAnchorFrom anchorReader =
|
|||
>>>
|
||||
proc (inlines, fAnchorElem) -> do
|
||||
case fAnchorElem of
|
||||
Right anchorElem ->
|
||||
arr (anchorElem <>) -<< inlines
|
||||
Right anchorElem -> returnA -< anchorElem
|
||||
Left _ -> returnA -< inlines
|
||||
where
|
||||
toAnchorElem :: Anchor -> Inlines
|
||||
|
|
|
@ -1 +1 @@
|
|||
[Para [Span ("an anchor",[],[]) [],Str "Some",Space,Str "text."],Para [Str "A",Space,Str "reference",Space,Str "to",Space,Link ("",[],[]) [Str "Some",Space,Str "text"] ("#an anchor",""),Str "."]]
|
||||
[Para [Span ("an anchor",[],[]) [],Str "Some",Space,Str "text."],Para [Str "A",Space,Str "reference",Space,Str "to",Space,Link ("",[],[]) [Str "Some",Space,Str "text"] ("#an anchor",""),Str "."],Para [Str "Some",Space,Str "text",LineBreak,Str "Another",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "link",Span ("anchor",[],[]) []]]
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue