Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
use wrapper from options instead of hardcoded div
  • Loading branch information
sarahs committed Apr 21, 2021
commit 5ddaafb6ba180421f5bd96d41d4dccc9ead10374
6 changes: 3 additions & 3 deletions lib/render-content/plugins/wrap-in-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ module.exports = options => {

for (const match of selectAll(options.selector, tree)) {
visit(tree, match, (node, i, parent) => {
const wrapper = parseSelector('div')
wrapper.children = [node]
parent.children[i] = wrapper
const parsedWrapper = parseSelector(wrapper)
parsedWrapper.children = [node]
parent.children[i] = parsedWrapper
})
}
}
Expand Down