Merge pull request #3166 from hubertp-lshift/bug/3134
Issue 3143: Don't duplicate text for anchors
This commit is contained in:
commit
4a2a7a21e5
3 changed files with 3 additions and 4 deletions
|
@ -810,9 +810,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
|
||||
|
|
|
@ -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…
Add table
Reference in a new issue