From b920657237953d617eb36eb6080260107c7c27f8 Mon Sep 17 00:00:00 2001 From: Wojciech Mazur Date: Tue, 5 Dec 2023 12:38:17 +0100 Subject: [PATCH] Fix source code sanitizer markdown snipets detection on Windows --- .../scala/scala/meta/internal/metals/SourceCodeSanitizer.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mtags-shared/src/main/scala/scala/meta/internal/metals/SourceCodeSanitizer.scala b/mtags-shared/src/main/scala/scala/meta/internal/metals/SourceCodeSanitizer.scala index 18b7b99e356..9e13562688f 100644 --- a/mtags-shared/src/main/scala/scala/meta/internal/metals/SourceCodeSanitizer.scala +++ b/mtags-shared/src/main/scala/scala/meta/internal/metals/SourceCodeSanitizer.scala @@ -26,7 +26,7 @@ class SourceCodeSanitizer[ParserCtx, ParserAST]( private final val MarkdownCodeSnippet = java.util.regex.Pattern .compile( - raw"^`{3}(\w+\s*)?\n([\s\S]*?)`{3}", + raw"```(\w+)?\s*\R([\s\S]*?)```", Pattern.MULTILINE | Pattern.CASE_INSENSITIVE ) private final val StackTraceLine =