@@ -31,12 +31,20 @@ export const YfmHeadingSpecs: ExtensionAuto<YfmHeadingSpecsOptions> = (builder,
3131 defining : true ,
3232 selectable : true ,
3333 parseDOM : [
34- { tag : 'h1' , getAttrs : getNodeAttrs ( 1 ) } ,
35- { tag : 'h2' , getAttrs : getNodeAttrs ( 2 ) } ,
36- { tag : 'h3' , getAttrs : getNodeAttrs ( 3 ) } ,
37- { tag : 'h4' , getAttrs : getNodeAttrs ( 4 ) } ,
38- { tag : 'h5' , getAttrs : getNodeAttrs ( 5 ) } ,
39- { tag : 'h6' , getAttrs : getNodeAttrs ( 6 ) } ,
34+ { tag : 'h1' , getAttrs : getNodeAttrs ( 1 ) , priority : 100 , consuming : true } ,
35+ { tag : 'h2' , getAttrs : getNodeAttrs ( 2 ) , priority : 100 , consuming : true } ,
36+ { tag : 'h3' , getAttrs : getNodeAttrs ( 3 ) , priority : 100 , consuming : true } ,
37+ { tag : 'h4' , getAttrs : getNodeAttrs ( 4 ) , priority : 100 , consuming : true } ,
38+ { tag : 'h5' , getAttrs : getNodeAttrs ( 5 ) , priority : 100 , consuming : true } ,
39+ { tag : 'h6' , getAttrs : getNodeAttrs ( 6 ) , priority : 100 , consuming : true } ,
40+ {
41+ // ignore anchor link inside headings
42+ tag : 'a.yfm-anchor' ,
43+ context : `${ headingNodeName } /` ,
44+ skip : true ,
45+ ignore : true ,
46+ priority : 1000 ,
47+ } ,
4048 ] ,
4149 toDOM ( node ) {
4250 const id = node . attrs [ YfmHeadingAttr . Id ] ;
0 commit comments