(4b1e7e8) Print the ticket title once in show
cmd_show printed the resolved title with its rule, then content_trim_colored printed the "# " heading again out of the file content, so every show output carried the title twice. The body now skips the heading, along with the blank line the template puts under it so nothing is left where it was. cmd_show keeps the surviving copy and colours it green, which is where the colour guideline puts a title. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
8b440593e2
commit
75fb2b3a6d
+4
-2
@@ -294,8 +294,10 @@ pub fn cmd_show(search: &str, worklane_dir: &Path) -> Result<()> {
|
||||
let (_status, title, content) = resolve_ticket(search, worklane_dir)?;
|
||||
let ticket_uuid = parse_ticket_field(&content, "ID");
|
||||
|
||||
println!("{}", title);
|
||||
// In characters, so a non-ASCII title is not over-drawn.
|
||||
// The only title in the output: content_trim_colored used to print it a second
|
||||
// time from the file content. Green per the colour guideline, and the rule is
|
||||
// measured in characters so a non-ASCII title is not over-drawn.
|
||||
println!("{}", color_text(&title, "green"));
|
||||
println!("{}", "─".repeat(title.chars().count()));
|
||||
println!("\n{}", content_trim_colored(&content));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user