From 82e48441fed1c2deb957ae6f10aff6475308435d Mon Sep 17 00:00:00 2001 From: Dushyant Acharya Date: Mon, 18 May 2026 03:22:57 +0530 Subject: [PATCH] docs: clarify terminal line wrapping for multiline problem matchers --- docs/debugtest/tasks.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/debugtest/tasks.md b/docs/debugtest/tasks.md index c8a1227b1b..8499d07748 100644 --- a/docs/debugtest/tasks.md +++ b/docs/debugtest/tasks.md @@ -727,8 +727,11 @@ test.js Our problem matcher is line-based so we need to capture the file name (test.js) with a different regular expression than the actual problem location and message (1:0 error Missing "use strict" statement). To do this, use an array of problem patterns for the `pattern` property. This way you define a pattern per each line you want to match. + > **Note:** In a multi-line problem matcher, each line in the output must be matched sequentially by the pattern array. Intermediate lines cannot be skipped, even if they are not needed for capturing values. +> **Note:** Terminal line wrapping can break multi-line problem matchers. If a line of output is too long and the terminal wraps it into two lines, VS Code processes it as two separate lines. Your problem matcher will fail unless your pattern array accounts for the extra wrapped line. To avoid this, ensure your terminal is wide enough or configure your build tool to disable line wrapping if possible. + The following problem pattern matches the output from ESLint in stylish mode - but still has one small issue that we need to resolve next. The code below has a first regular expression to capture the file name and the second to capture the line, column, severity, message, and error code: ```json