fix(task): handle carriage return in task description (#27099)

Ref https://github.com/denoland/deno/pull/27069#discussion_r1857702814
This commit is contained in:
Bartek Iwańczuk 2024-11-27 01:12:47 +00:00
parent 461c9a8898
commit e01df2510c
No known key found for this signature in database
GPG key ID: 0C6BCDDC3B3AD750
3 changed files with 9 additions and 1 deletions

View file

@ -721,7 +721,7 @@ fn print_available_tasks(
)?;
if let Some(description) = &desc.task.description {
let slash_slash = colors::italic_gray("//");
for line in description.split('\n') {
for line in description.lines() {
writeln!(writer, " {slash_slash} {}", colors::italic_gray(line))?;
}
}