File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
crates/heading_anchors/src Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 2525
2626use github_slugger:: Slugger ;
2727use markdown_it:: {
28- parser:: { core:: CoreRule , extset:: MarkdownItExt } ,
28+ parser:: { core:: CoreRule , extset:: MarkdownItExt , inline :: builtin :: InlineParserRule } ,
2929 plugins:: cmark:: block:: { heading:: ATXHeading , lheading:: SetextHeader } ,
3030 MarkdownIt , Node , NodeValue ,
3131} ;
3232
3333pub fn add ( md : & mut MarkdownIt ) {
3434 md. ext . get_or_insert_default :: < HeadingAnchorOptions > ( ) ;
35- md. add_rule :: < AddHeadingAnchors > ( ) ;
35+ md. add_rule :: < AddHeadingAnchors > ( )
36+ . after :: < InlineParserRule > ( ) ;
3637}
3738
3839pub fn add_with_options ( md : & mut MarkdownIt , options : HeadingAnchorOptions ) {
3940 md. ext . insert ( options) ;
40- md. add_rule :: < AddHeadingAnchors > ( ) ;
41+ md. add_rule :: < AddHeadingAnchors > ( )
42+ . after :: < InlineParserRule > ( ) ;
4143}
4244
4345#[ derive( Debug ) ]
You can’t perform that action at this time.
0 commit comments