Closed rowanc1 closed 2 years ago
I don't think we need the processed
flag - the MyST AST represents the point when the entire document is parsed (including nested parsing) and before any further transforms have occurred. This means directives are always processed and the processed
flag would always be true.
Also, if the directive is unknown, it is still "processed" - it just doesn't have any children
.
And another minor thing: directives need to at least wrap PhrasingContent
in addition to FlowContent
. For example, we have an image directive that contains an image
(phrasing) node.
In looking through this again, I tend to agree that the additional flag is overkill. I think that there are a number of undocumented pieces in an implementation that are going to be like this that don't need to make it down to the "spec" of defined properties. These should mostly be the things that are necessary to render downstream and are absolutely required.
Add
processed
flag to directive.Directives wrap other FlowContent.
Define a transform --> This should lift all children out of the directives.