markdown_ppp/html_printer/config.rs
1pub struct Config {
2 pub(crate) width: usize,
3 pub(crate) anchor_prefix: String,
4}
5
6impl Default for Config {
7 fn default() -> Self {
8 Self {
9 width: 80,
10 anchor_prefix: String::new(),
11 }
12 }
13}
14
15impl Config {
16 pub fn with_width(self, width: usize) -> Self {
17 Self { width, ..self }
18 }
19
20 pub fn with_anchor_prefix(self, anchor_prefix: String) -> Self {
21 Self {
22 anchor_prefix,
23 ..self
24 }
25 }
26}