File tree 1 file changed +2
-25
lines changed 1 file changed +2
-25
lines changed Original file line number Diff line number Diff line change @@ -128,33 +128,10 @@ export function linkify_headings(): Transformer {
128
128
const children = ( to_hast ( node ) as Parent ) . children ;
129
129
130
130
if ( ! node . data ) node . data = { } ;
131
- if ( ! node . data . hProperties ) node . data . hProperties = {
132
- id : slug
133
- } ;
131
+ if ( ! node . data . hProperties ) node . data . hProperties = { } ;
134
132
if ( ! node . data . hChildren ) node . data . hChildren = [ ] ;
135
133
136
- // const span_node = {
137
- // type: "element",
138
- // tagName: "span",
139
- // properties: { id: [slug], className: ["offset-anchor"] },
140
- // };
141
-
142
- // const a_node = {
143
- // type: "element",
144
- // tagName: "a",
145
- // properties: {
146
- // href: `${data.dir}#${slug}`,
147
- // className: ["anchor"],
148
- // "aria-hidden": true,
149
- // },
150
- // };
151
-
152
- // if (node.depth > data.base_level + 1)
153
- // //@ts -ignore
154
- // span_node.properties["data-scrollignore"] = true;
155
-
156
- // node.data.hChildren = [span_node, a_node];
157
-
134
+ node . data . hProperties . id = slug ;
158
135
children . forEach ( ( v ) => node . data . hChildren . push ( v ) ) ;
159
136
} ) ;
160
137
} ;
You can’t perform that action at this time.
0 commit comments