We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
processingInstructions already ignores any node that fails all shouldProcessNode; it seems both confusing and unnecessary to have that extra guard.
processingInstructions
shouldProcessNode
Below is the code that I take issue with:
if (isValidNode(node)) { // how is this helpful? var processingInstruction = find(function (processingInstruction) { return processingInstruction.shouldProcessNode(node); }, processingInstructions); if (processingInstruction != null) { var children = reject(function (x) {return x == null || x === false;}, addIndex(map)(function (child, i) { return traverseDom(child, isValidNode, processingInstructions, i); }, node.children || [])); if (processingInstruction.replaceChildren) { return utils.createElement(node, index, node.data, [ processingInstruction.processNode(node, children, index), ]); } return processingInstruction.processNode(node, children, index); } else { return false; } } else { return false; }
The text was updated successfully, but these errors were encountered:
I agree. If there is a use case for this, can it be displayed in the README?
Sorry, something went wrong.
No branches or pull requests
processingInstructions
already ignores any node that fails allshouldProcessNode
; it seems both confusing and unnecessary to have that extra guard.Below is the code that I take issue with:
The text was updated successfully, but these errors were encountered: