From c1174837617447e923a22902e5010726d0c5567e Mon Sep 17 00:00:00 2001 From: Eric Mc Sween <5454374+emcsween@users.noreply.github.com> Date: Tue, 13 Aug 2024 08:54:36 -0400 Subject: [PATCH] Merge pull request #19882 from overleaf/mj-tcblisting [web] Mark tcblisting as verbatim GitOrigin-RevId: a64602b2b0d41c32e5f8612f190c6f5f8382f94b --- .../languages/latex/linter/latex-linter.worker.js | 4 +++- .../frontend/js/features/source-editor/lezer-latex/tokens.mjs | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/services/web/frontend/js/features/source-editor/languages/latex/linter/latex-linter.worker.js b/services/web/frontend/js/features/source-editor/languages/latex/linter/latex-linter.worker.js index 6ae97d474b..0bfaf94d62 100644 --- a/services/web/frontend/js/features/source-editor/languages/latex/linter/latex-linter.worker.js +++ b/services/web/frontend/js/features/source-editor/languages/latex/linter/latex-linter.worker.js @@ -1820,7 +1820,9 @@ const EnvHandler = function (TokeniseResult, ErrorReporter) { // flag any verbatim environments for special handling if ( name && - name.match(/^(verbatim|boxedverbatim|lstlisting|minted|Verbatim)$/) + name.match( + /^(verbatim|boxedverbatim|lstlisting|minted|Verbatim|tcblisting)$/ + ) ) { delimiter.verbatim = true } diff --git a/services/web/frontend/js/features/source-editor/lezer-latex/tokens.mjs b/services/web/frontend/js/features/source-editor/lezer-latex/tokens.mjs index 552f814a53..47dab9f3fb 100644 --- a/services/web/frontend/js/features/source-editor/lezer-latex/tokens.mjs +++ b/services/web/frontend/js/features/source-editor/lezer-latex/tokens.mjs @@ -697,6 +697,7 @@ const verbatimEnvNames = new Set([ 'minted', 'Verbatim', 'lstlisting', + 'tcblisting', 'codeexample', 'comment', ])