Skip to content
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

Allow nodes to be preprocessed #90

Closed
wants to merge 7 commits into from

Conversation

manixate
Copy link

This can help with sharing code to update the nodes based on a criteria before they are processed by individual processors.

Fixes: #38

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 1653592 on manixate:feature/preprocess-node into eea2ee1 on aknuds1:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 1653592 on manixate:feature/preprocess-node into eea2ee1 on aknuds1:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 1653592 on manixate:feature/preprocess-node into eea2ee1 on aknuds1:master.

@coveralls
Copy link

coveralls commented Jun 12, 2019

Coverage Status

Coverage remained the same at 100.0% when pulling 161d40d on manixate:feature/preprocess-node into e6fa897 on aknuds1:master.

lib/parser.js Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
lib/process-node-definitions.js Outdated Show resolved Hide resolved
@manixate
Copy link
Author

@aknuds1 Fixed the review comments. Please let me know if you have more feedback for this.

@aknuds1
Copy link
Owner

aknuds1 commented Aug 6, 2019

@manixate Thanks for your contribution! I merged your changes via another branch so that I could make some revisions to it. Closing this PR as it's no longer necessary.

I published a new version with the changes to NPM as v1.4.0 as well.

@aknuds1 aknuds1 closed this Aug 6, 2019
@manixate
Copy link
Author

manixate commented Aug 8, 2019

@aknuds1 thanks for merging it. I checked the changes but I think it is doing something different. The idea behind preprocessing instructions was to let multiple instructions execute on the same node. That would have allowed to have smaller instruction sets for each node.

e.g. a preprocessor to update all anchor tags, another to add specific ids to tags containing specific preprocess='true'. If an anchor tag contained preprocess='true' then the updates would depend on the order of instruction set because of find while the expected output was to have an anchor tag get its href updated and also have an id added.

The only way to get it do the above is to have multiple preprocessing instructions, 1 for anchor update, another for adding id and also another that checks both anchor and the attribute to do both things together too.

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.

Feature request: Enhancing the node object itself before rendering a react component
3 participants