-
Notifications
You must be signed in to change notification settings - Fork 2
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
AST #239
AST #239
Conversation
917c2de
to
e1ae96a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whew! Thank you! @Andrew-Morozko
c = c.NextSibling() | ||
default: | ||
n.ReplaceChild(n, c, repl) | ||
c = repl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be c = repl.NextSibling()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's intentional, added a comment and a limit on recursive replacements.
This allows replacer to be a pure function for replacement logic like
Node A needs to be replaced by CustomRendererA
Node B needs to be replaced by CustomRendererB
CustomRendererA may replace Node A with Node B, or include Node B in one of the children. We don't know what custom renderers may do. Speaking of this, added the ability to return errors from replacers, useful when remote plugins are in play.
Partial switch to AST:
What's left to do:
RawLaTeX
)I truly am sorry for another huge PR, even though I split this feature in two pieces it still got away from me 😭