Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

fix(readme-sync): don't leak placeholder disambiguation suffix into web docs prompt (#2058)

Maximilian Roos0089747d06bf
diff --git a/docs/content/config.md b/docs/content/config.md
index 7966ce972..55fc7621b 100644
--- a/docs/content/config.md
+++ b/docs/content/config.md
@@ -853,7 +853,7 @@ Markers appear at the end of the Status column, after git symbols:
<!-- ⚠️ AUTO-GENERATED from tests/snapshots/integration__integration_tests__list__readme_example_list_marker.snap — edit source to update -->
-{% terminal(cmd="wt list (markers)") %}
+{% terminal(cmd="wt list") %}
&#32;&#32;<b>Branch</b> <b>Status</b> <b>HEAD±</b> <b>main↕</b> <b>Remote⇅</b> <b>Commit</b> <b>Age</b> <b>Message</b>
@ main <span class=d>^</span><span class=d>⇡</span> <span class=g>⇡1</span> <span class=d>33323bc1</span> <span class=d>1d</span> <span class=d>Initial commit</span>
+ feature-api <span class=d>↑</span> 🤖 <span class=g>↑1</span> <span class=d>70343f03</span> <span class=d>1d</span> <span class=d>Add REST API endpoints</span>
diff --git a/tests/integration_tests/readme_sync.rs b/tests/integration_tests/readme_sync.rs
index 39540e73c..141cb7fe9 100644
--- a/tests/integration_tests/readme_sync.rs
+++ b/tests/integration_tests/readme_sync.rs
@@ -458,12 +458,14 @@ fn expand_command_placeholders(
ExpandMode::Html => {
let html = parse_snapshot_content_for_docs(&snapshot_content)?;
let normalized = encode_leading_spaces(&trim_lines(&html));
- // cmd= parameter uses the placeholder id (enables giallo syntax
- // highlighting on the command line); prompt ($) is added via
- // CSS ::before, so not included in HTML.
+ // cmd= parameter uses the displayed command (enables giallo
+ // syntax highlighting on the command line) rather than the
+ // placeholder id, so disambiguation suffixes like `(markers)`
+ // don't leak into the rendered prompt. Prompt ($) is added
+ // via CSS ::before, so not included in HTML.
format!(
"<!-- ⚠️ AUTO-GENERATED from tests/snapshots/{snapshot_name} — edit source to update -->\n\n\
- {{% terminal(cmd=\"{placeholder_id}\") %}}\n\
+ {{% terminal(cmd=\"{display_cmd}\") %}}\n\
{normalized}\n\
{{% end %}}\n\n\
<!-- END AUTO-GENERATED -->",