You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
remark-stringify supports a property spread on each node - which it uses to decide the tightness of the output.
it is needed to output something like -
- a0
- a1
from nested lists (ast) created using this library.
Can we add support for this property in all builder functions? This is just a passthrough property which gets added to the output object.
Maybe a general mechanism for this instead? Ex. extra object as input whose all properties gets added to output.
Considering they are part of the same ecosystem, it makes sense to play nice.
The text was updated successfully, but these errors were encountered:
Is spread part of the public API for remark-stringify? I can't find it in the types.
In either case, I'd be open to improving alignment with the ecosystem. I'd just want to ensure that any changes in this library align with the public/private nature of spread in other packages.
spread does seem to be a part of the of List and ListItem nodes in the mdast specification itself. Having support for this would be very nice.
remark-stringify also supports the spread option in lists and list items. I've tested that on my own and (as far as I can tell) support for spread probably landed in remark in this PR.
As for my use case, I'm processing a bunch of markdown files to generate a sort of "Table of Contents" in Markdown format and feeding that into a documentation generator (DocsifyJS) which expects "tight" lists and list items for proper styling in its generated HTML.
I have created a PR at #88 which does add support for spread to mdast-builder. But, I think the API probably needs review from @mike-north first.
remark-stringify supports a property
spread
on each node - which it uses to decide the tightness of the output.it is needed to output something like -
from nested lists (ast) created using this library.
Can we add support for this property in all builder functions? This is just a passthrough property which gets added to the output object.
Maybe a general mechanism for this instead? Ex. extra object as input whose all properties gets added to output.
Considering they are part of the same ecosystem, it makes sense to play nice.
The text was updated successfully, but these errors were encountered: