cmark_writer/options.rs
1//! CommonMark formatting options.
2//!
3//! This module provides configuration options for the CommonMark writer.
4
5/// CommonMark formatting options
6#[derive(Debug, Clone)]
7pub struct WriterOptions {
8 /// Whether to enable strict mode (strictly following CommonMark specification)
9 pub strict: bool,
10 /// Hard break mode (true uses two spaces followed by a newline, false uses backslash followed by a newline)
11 pub hard_break_spaces: bool,
12 /// Number of spaces to use for indentation levels
13 pub indent_spaces: usize,
14}
15
16impl Default for WriterOptions {
17 fn default() -> Self {
18 Self {
19 strict: true,
20 hard_break_spaces: false,
21 indent_spaces: 4,
22 }
23 }
24}