pub struct MD030Config {
pub ul_single: PositiveUsize,
pub ul_multi: PositiveUsize,
pub ol_single: PositiveUsize,
pub ol_multi: PositiveUsize,
pub ol_align_column: OlAlignColumn,
}Expand description
Configuration for MD030 (Spaces after list markers).
Public so other rules (notably MD013’s reflow) can load it through the shared
crate::rule_config_serde::load_rule_config path and reuse
MD030Config::expected_spaces, rather than re-deriving the spacing rules.
Fields§
§ul_single: PositiveUsizeSpaces for single-line unordered list items (default: 1)
ul_multi: PositiveUsizeSpaces for multi-line unordered list items (default: 1)
ol_single: PositiveUsizeSpaces for single-line ordered list items (default: 1)
ol_multi: PositiveUsizeSpaces for multi-line ordered list items (default: 1)
ol_align_column: OlAlignColumnAlign ordered list text to this column, measured from the start of the marker (default: 0 = off; valid values are 3-6, with 4 the usual choice). Narrower markers are padded up to the column; markers too wide for it overflow with one space rather than pushing the rest of the list over. See docs/md030.md.
Implementations§
Source§impl MD030Config
impl MD030Config
Sourcepub fn expected_spaces(
&self,
is_ordered: bool,
is_multi: bool,
marker_len: usize,
) -> usize
pub fn expected_spaces( &self, is_ordered: bool, is_multi: bool, marker_len: usize, ) -> usize
Number of spaces that should follow a list marker, given whether the list
is ordered, whether the item spans multiple lines, and the marker width
(e.g. 1 for -, 2 for 1.).
The ol-align-column override takes precedence for ordered lists: it
aligns text to the target column measured from the marker start, padding a
narrow marker and letting one too wide overflow with a single space, capped
at 4 spaces (5+ would start a CommonMark indented code block). Otherwise the
fixed ul-single/ul-multi/ol-single/ol-multi value applies.
Trait Implementations§
Source§impl Clone for MD030Config
impl Clone for MD030Config
Source§fn clone(&self) -> MD030Config
fn clone(&self) -> MD030Config
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more