-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix enrichment bug #39
Conversation
|
blocks/enrichment/enrichment.js
Outdated
Array.from(sections[0].children) | ||
.forEach((child) => wrapper.parentNode.insertBefore(child, wrapper)); | ||
} else if (sections.length > 1) { | ||
// If multiple section, append them to current section |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
append them to current section
You are inserting them after the current section, not to the current section, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes the sections will be added after the section that contains the enrichment block. Let me update the comment to make this more clear.
#text
elements returned bysection.childNodes
. So insteadsection.children
is used.Test URLs: