Created
June 26, 2019 16:34
-
-
Save ddbeck/f6ae317aa3d36786286724fffe7a283b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const visit = require('unist-util-visit') | |
function transformer(tree, file) { | |
visit(tree, 'element', (node, index, parent) => { | |
if (node.tagName === 'div' && node.properties.className && node.properties.className.includes('bc-data')) { | |
parent.children.splice(index, 1); | |
} | |
}); | |
} | |
module.exports = () => transformer; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment