Expand description
Inline configuration comment handling for markdownlint compatibility
Supports:
<!-- markdownlint-disable -->- Disable all rules from this point<!-- markdownlint-enable -->- Re-enable all rules from this point<!-- markdownlint-disable MD001 MD002 -->- Disable specific rules<!-- markdownlint-enable MD001 MD002 -->- Re-enable specific rules<!-- markdownlint-disable-line MD001 -->- Disable rules for current line<!-- markdownlint-disable-next-line MD001 -->- Disable rules for next line<!-- markdownlint-capture -->- Capture current configuration state<!-- markdownlint-restore -->- Restore captured configuration state<!-- markdownlint-disable-file -->- Disable all rules for entire file<!-- markdownlint-enable-file -->- Re-enable all rules for entire file<!-- markdownlint-disable-file MD001 MD002 -->- Disable specific rules for entire file<!-- markdownlint-enable-file MD001 MD002 -->- Re-enable specific rules for entire file<!-- markdownlint-configure-file { "MD013": { "line_length": 120 } } -->- Configure rules for entire file<!-- prettier-ignore -->- Disable all rules for next line (compatibility with prettier)
Also supports rumdl-specific syntax with same semantics.
Structs§
- Inline
Config - Inline
Config Warning - Warning about unknown rules in inline config comments
Functions§
- is_
capture_ comment - Check if line contains a capture comment
- is_
restore_ comment - Check if line contains a restore comment
- parse_
configure_ file_ comment - Parse a configure-file comment and return the JSON configuration
- parse_
disable_ comment - Parse a disable comment and return the list of rules (empty vec means all rules)
- parse_
disable_ file_ comment - Parse a disable-file comment and return the list of rules (empty vec means all rules)
- parse_
disable_ line_ comment - Parse a disable-line comment
- parse_
disable_ next_ line_ comment - Parse a disable-next-line comment
- parse_
enable_ comment - Parse an enable comment and return the list of rules (empty vec means all rules)
- parse_
enable_ file_ comment - Parse an enable-file comment and return the list of rules (empty vec means all rules)
- validate_
inline_ config_ rules - Validate all inline config comments in content and return warnings for unknown rules.