Add zero-pad option for numbered chapter titles
A "Zero-pad #" checkbox pads chapter titles that default to their position number with leading zeros to a uniform width (the digit count of the largest chapter number, e.g. 03. of 12). Padding never applies to "# Title:" headers or manual overrides. The setting persists in config. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,10 @@ pub struct Config {
|
||||
/// An empty value disables header splitting.
|
||||
#[serde(default = "default_marker")]
|
||||
pub draft_marker: String,
|
||||
/// When a chapter title defaults to its position number, pad it with leading
|
||||
/// zeros to the width of the largest chapter number (e.g. "03." of 12).
|
||||
#[serde(default)]
|
||||
pub zero_pad_index: bool,
|
||||
}
|
||||
|
||||
/// Default header/body separator, matching the manuscript drafting convention.
|
||||
@@ -32,6 +36,7 @@ impl Default for Config {
|
||||
export_path,
|
||||
show_preview: false,
|
||||
draft_marker: default_marker(),
|
||||
zero_pad_index: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user