Node
Shape Passed to customizeTOC
Not unified
Standard #9
Open
Description
The shape of the node
object passed to customizeTOC
doesn't match the Node
interface as specified by the latest version of unified
. This is what the plugin is passing:
{
type: 'element',
tagName: 'ol',
properties: { className: 'toc toc-level toc-level-1' },
children: [ [Object] ]
}
This is what unified expects:
interface Node {
type: string
data: Data?
position: Position?
}
As a result, we've no way to export the TOC using that method to stringify it, store the AST separately, etc.
Metadata
Assignees
Labels
No labels