Skip to content

fix: incorrect ordering of links #339

Open
Imanpal Singh (imanpalsingh) wants to merge 4 commits into
contentful:masterfrom
imanpalsingh:fix-wrong-order-of-links
Open

fix: incorrect ordering of links #339
Imanpal Singh (imanpalsingh) wants to merge 4 commits into
contentful:masterfrom
imanpalsingh:fix-wrong-order-of-links

Conversation

@imanpalsingh
Copy link
Copy Markdown

The addLinksFromRichTextNode crawls through the nodes and always picks up the last item in that array. This causes links to be entity links to be generated in the incorrect order.

Instead of taking the last node, the first one is picked up to parse the nodes in the order they appeared in the rich text.

The addLinksFromRichTextNode crawls through the nodes and always picks
up the last item in that array. This causes links to be entity links to
be generated in the incorrect order. Instead of taking the last node,
the first one is picked up to parse the nodes in the order they appeared
in the rich text
@imanpalsingh Imanpal Singh (imanpalsingh) changed the title Fix incorrect ordering of links fix: incorrect ordering of links Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants