-
Notifications
You must be signed in to change notification settings - Fork 111
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
Get parent token #71
Labels
Comments
vallentin
added a commit
to vallentin/mistletoe
that referenced
this issue
Nov 15, 2018
Closed
pbodnar
added a commit
that referenced
this issue
Dec 16, 2023
pbodnar
added a commit
that referenced
this issue
Jan 20, 2024
pbodnar
added a commit
that referenced
this issue
Jan 20, 2024
At the same time, we also make the `children` attribute a _property_. This makes it easier for us to set the `parent` to every child token, without having to change much of the existing code.
pbodnar
added a commit
that referenced
this issue
Jan 27, 2024
At the same time, we also make the `children` attribute a _property_. This makes it easier for us to set the `parent` to every child token, without having to change much of the existing code.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've implemented a custom
HTMLRenderer
, where I want to know ifrender_image
is the only element on a paragraph.Essentially be able to differentiate the output between these:
This could be possible if
token
has aparent
attribute.Currently I have a
_set_parent
function, that is applied toDocument
inrender
.However it would be nice, if this was part of mistletoe and done as children are added to the token.
The text was updated successfully, but these errors were encountered: