Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 7 additions & 21 deletions .github/workflows/classroom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -381,32 +381,18 @@ jobs:
if (i <= length(tap_lines) && trimws(tap_lines[i]) == '---') {
i <- i + 1L
while (i <= length(tap_lines) && trimws(tap_lines[i]) != '...') {
msg_lines <- c(msg_lines, tap_lines[i])
msg_lines <- c(msg_lines, trimws(tap_lines[i]))
i <- i + 1L
}
i <- i + 1L
}
msg_idx <- grep('^[[:space:]]*message:', msg_lines)
msg_idx <- grep('^message:', msg_lines)
detail <- if (length(msg_idx) > 0) {
raw <- sub('^[[:space:]]*message:[[:space:]]*', '', msg_lines[msg_idx[1]])
if (grepl('^\\|', trimws(raw))) {
raw <- ''
j <- msg_idx[1] + 1L
while (j <= length(msg_lines) &&
!grepl('^ [^[:space:]]', msg_lines[j])) {
content <- trimws(msg_lines[j])
if (nchar(content) > 0) {
raw <- if (nchar(raw) == 0) content else paste0(raw, ' ', content)
}
j <- j + 1L
}
} else {
j <- msg_idx[1] + 1L
while (j <= length(msg_lines) &&
!grepl('^ [^[:space:]]', msg_lines[j])) {
raw <- paste0(raw, ' ', trimws(msg_lines[j]))
j <- j + 1L
}
raw <- sub('^message:[[:space:]]*', '', msg_lines[msg_idx[1]])
j <- msg_idx[1] + 1L
while (j <= length(msg_lines) && grepl('^ ', msg_lines[j])) {
raw <- paste0(raw, ' ', trimws(msg_lines[j]))
j <- j + 1L
Comment on lines +391 to +395
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

msg_lines is built with trimws(...) earlier, so continuation lines won’t retain the leading indentation. That makes the while ( ... grepl('^ ', msg_lines[j])) loop effectively dead and truncates multi-line failure messages to just the first message: line. Consider either keeping an untrimmed copy of msg_lines for indentation-based parsing, or adjusting the continuation detection to not rely on leading spaces that have been stripped.

Copilot uses AI. Check for mistakes.
}
raw
} else ''
Expand Down
Loading