Closed milahu closed 2 years ago
Please respect our time by filling out the template, following the support guidelines, and taking some time to think through your questions. I will block you otherwise.
You can use unist-util-select
in any unist language.
unified is specifically not pandoc, it specifically has different ASTs, being like Pandoc is not the goal. Pandoc is already a very good version of Pandoc.
Initial checklist
Problem
xast-parse
produces a different AST thanhast-parse
so i cannot usehast-util-select
onxast
part of https://github.com/rehypejs/rehype/pull/112 (trying to use hast tools for xml)
Solution
unify ASTs across all parsers in the unifiedjs ecosystem so that tools like
select
"just work" on all ASTsthis would also allow to just "plug in" tools like graphQL, or interface with graph databases ...benefit: ASTs are composable, for example, i can embed a python AST in a html code block. or, i can parse
<img src="image.svg">
, parse the svg file at src, transform the svg, inline the svg in htmlmaybe extend the
Node
type of a parser-generator liketree-sitter
orlezer-parser
Alternatives
write N tools for M ASTs ...
which is the opposite of "unified"
"what would pandoc do?"