-
Notifications
You must be signed in to change notification settings - Fork 122
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
Refactor of AST traversal method #944
Merged
abelsromero
merged 4 commits into
asciidoctor:main
from
abelsromero:branch-main/refactor-AST-traversal-in-parser-doxia-module
Oct 19, 2024
Merged
Refactor of AST traversal method #944
abelsromero
merged 4 commits into
asciidoctor:main
from
abelsromero:branch-main/refactor-AST-traversal-in-parser-doxia-module
Oct 19, 2024
Conversation
This file contains 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
abelsromero
changed the title
Make traversal part of NodeProcessor
Refactor of AST traversal method
Oct 18, 2024
abelsromero
force-pushed
the
branch-main/refactor-AST-traversal-in-parser-doxia-module
branch
from
October 18, 2024 21:41
c30eed8
to
620a81d
Compare
abelsromero
force-pushed
the
branch-main/refactor-AST-traversal-in-parser-doxia-module
branch
from
October 18, 2024 21:44
620a81d
to
722bfb6
Compare
abelsromero
force-pushed
the
branch-main/refactor-AST-traversal-in-parser-doxia-module
branch
from
October 18, 2024 21:58
722bfb6
to
54b14d5
Compare
abelsromero
force-pushed
the
branch-main/refactor-AST-traversal-in-parser-doxia-module
branch
from
October 18, 2024 22:17
54b14d5
to
002102c
Compare
abelsromero
force-pushed
the
branch-main/refactor-AST-traversal-in-parser-doxia-module
branch
from
October 18, 2024 22:29
002102c
to
65502e9
Compare
abelsromero
force-pushed
the
branch-main/refactor-AST-traversal-in-parser-doxia-module
branch
from
October 18, 2024 22:40
65502e9
to
5c1fc75
Compare
abelsromero
force-pushed
the
branch-main/refactor-AST-traversal-in-parser-doxia-module
branch
from
October 19, 2024 10:02
5c1fc75
to
d77ba1c
Compare
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thank you for opening a pull request and contributing to asciidoctor-maven-plugin!
What kind of change does this PR introduce? (check at least one)
What is the goal of this pull request?
Solve limitations in the current method used to traverse the AST.
Currently, we explored all nodes in a loop in
NodeSinker
that already showed issues with nested elements that need to generate content "around" nodes, like lists. That forced to have specific loops for such elements.The new method does not look externally (outside of
NodeProcessors
) but instead injects NodeSinker in the NodeProcessors so each one decides if further traversal needs to happen. This has simplified the code notably and removes the need for specific dependency injection.Now all
NodeProcessors
are instantiated and stored inNodeSinker
without special cases.Are there any alternative ways to implement this?
Probably, so far this works 😄
Are there any implications of this pull request? Anything a user must know?
There are some changes in how HTML content is generated:
<h1></h1>
<pre></pre>
<div>
elements for better organization.content
instead ofsource
Is it related to an existing issue?
But it's related to this PR #938
Finally, please add a corresponding entry to CHANGELOG.adoc