Documentation
¶
Overview ¶
Package tocdirective implements MDS035, which flags renderer-specific table-of-contents directives that render as literal text on CommonMark and goldmark.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Rule ¶
type Rule struct{}
Rule detects renderer-specific TOC directives.
func (*Rule) Check ¶
func (r *Rule) Check(f *lint.File) []lint.Diagnostic
Check implements rule.Rule.
func (*Rule) EnabledByDefault ¶
EnabledByDefault implements rule.Defaultable.
func (*Rule) Fix ¶
Fix implements rule.FixableRule. Each matched TOC directive token on its own line is replaced with an empty <?toc?>\n<?/toc?> block. Blank lines are inserted above and below when adjacent content would otherwise fuse the block into a paragraph. Only replaces tokens inside Paragraph nodes (same as Check), avoiding code blocks and other contexts.
Click to show internal directories.
Click to hide internal directories.