Skip to content

Remove unnecessary metadata on directive child #35

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

Open
chrisjsewell opened this issue Mar 29, 2022 · 1 comment
Open

Remove unnecessary metadata on directive child #35

chrisjsewell opened this issue Mar 29, 2022 · 1 comment
Assignees

Comments

@chrisjsewell
Copy link
Member

As just discussed, I don't think we need this any more, since you can retrieve this info from the (directive) parent node.

Originally posted by @chrisjsewell in #34 (comment)

@fwkoch
Copy link
Member

fwkoch commented Mar 31, 2022

I think if we are no longer copying meta from the directive to the parsed child, we still want to make sure we are copying all relevant attributes to the child nodes in the corresponding run methods. Although all the metadata will always be available on the parent directive, it's a hassle to have to walk back up the tree from the children to get it.

This PR does just that: #36

and is consumed in mystjs with this: jupyter-book/mystmd#40

In the end, with these ^^ we are basically doing the same thing as copying meta, it is just more explicit. We could also not copy attributes to the parsed children at all; this would just require a bit more management when going between directive parent <=> parsed child in mystjs.

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

No branches or pull requests

2 participants