From a0baff5daa4f64dfd82e1595e1af537be0c5e2c4 Mon Sep 17 00:00:00 2001 From: Martin Ball Date: Sun, 8 Nov 2026 16:17:53 +0000 Subject: [PATCH] #6005: glossary limits strict export to what the output shows; escape run's save errors Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01FypgCX8G9hbs6XYZFsgjbL --- GLOSSARY.md | 5 +++-- apps/wordcraft-cli/src/main.rs | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/GLOSSARY.md b/GLOSSARY.md index 888e0e29d8..9d1ec531ed 100644 --- a/GLOSSARY.md +++ b/GLOSSARY.md @@ -52,8 +52,9 @@ _Avoid_: Custom dictionaries ## Export **Strict export**: -An export that writes nothing, and reports why, when the output would leave out a character or a -picture the document contains. +An export that writes nothing, and reports why, when a character or picture the output is meant +to show would be missing from it. Text the output doesn't show (hidden text, deletions without +markup) isn't checked. _Avoid_: Safe mode, validated export **Missing glyph**: diff --git a/apps/wordcraft-cli/src/main.rs b/apps/wordcraft-cli/src/main.rs index 963d275481..903ba69d5c 100644 --- a/apps/wordcraft-cli/src/main.rs +++ b/apps/wordcraft-cli/src/main.rs @@ -637,7 +637,7 @@ fn run>(args: &[S]) -> Result<(), Failure> { return Err(format!("{out}: is a folder, not a file").into()); } if !out.to_ascii_lowercase().ends_with(".png") { - wordcraft_engine::io::save_bytes(out, &s.doc)?; + wordcraft_engine::io::save_bytes(out, &s.doc).map_err(engine_error)?; } } for out in outputs {