fix(pdftract-1j0f8): prevent newline accumulation in CLI reference generator
The gen-cli-reference binary was accumulating extra blank lines after the <!-- AUTOGEN END --> marker on each regeneration because it preserved all content after the marker (including leading whitespace) and then added its own newlines. Fix: Trim leading whitespace from hand-curated content before appending. Also regenerated cli-reference.md to remove accumulated blank lines. Closes pdftract-1j0f8
This commit is contained in:
parent
cc4daa2bba
commit
ad29d9dadc
3 changed files with 47 additions and 1149 deletions
|
|
@ -54,7 +54,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
let hand_curated_content = if output_path.exists() {
|
||||
let existing = fs::read_to_string(&output_path)?;
|
||||
if let Some(idx) = existing.find(AUTOGEN_END_MARKER) {
|
||||
Some(existing[idx + AUTOGEN_END_MARKER.len()..].to_string())
|
||||
// Trim leading whitespace from curated content to prevent newline accumulation
|
||||
Some(existing[idx + AUTOGEN_END_MARKER.len()..].trim_start().to_string())
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
|
|
|||
|
|
@ -612,8 +612,6 @@ Exit code policy: exits 0 if no checks FAIL (WARN does not affect exit code); ex
|
|||
|
||||
<!-- AUTOGEN END -->
|
||||
|
||||
|
||||
|
||||
## Hand-Curated Content
|
||||
|
||||
> **Note:** Any content added after this marker will be preserved
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue