currently, I have to manage some forks of your projects in order to deal with attributes in a less strict way. This situation was improved very well but right know I have still the problem to work with <template> nodes. A <template> node create an additional container #document-fragment and does not expose its children through children but content.
Do you have an idea how to deal with that in your util packages? My project based on your https://github.com/rehypejs/rehype-format project which use the parents.length to check the indentation depth but this information is broken since a template node is handled as a new document.
Are you open for an optional flag to handle a template node like any other element? e.g in
hastscript
hast-util-from-parse5
hast-util-to-html
Purpose: for formatter, analyser which doesn't need such context of scoping but for much easier parsing. Problem: simple template nodes or nested template nodes.
Hi @wooorm,
currently, I have to manage some forks of your projects in order to deal with attributes in a less strict way. This situation was improved very well but right know I have still the problem to work with
<template>
nodes. A<template>
node create an additional container#document-fragment
and does not expose its children throughchildren
butcontent
.Do you have an idea how to deal with that in your util packages? My project based on your https://github.com/rehypejs/rehype-format project which use the
parents.length
to check the indentation depth but this information is broken since a template node is handled as a new document.Are you open for an optional flag to handle a template node like any other element? e.g in
Purpose: for formatter, analyser which doesn't need such context of scoping but for much easier parsing. Problem: simple template nodes or nested template nodes.