Fix unused variable trimmed in src/cm6-crbasic.ts:54

trimmed is assigned but then line.text.trim() is used directly in the regex tests instead.
This commit is contained in:
utleysam 2026-06-04 22:50:54 -06:00 committed by GitHub
parent a7a6e302bf
commit ccb26bebdc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -51,18 +51,18 @@ class CRBasicHighlighter {
for (let i = 1; i <= doc.lines; i++) {
const line = doc.line(i);
const trimmed = line.text.trim().toLowerCase();
const trimmed = line.text.trim();
if (!inCrbasicBlock) {
// Check for opening fence: ```crbasic (with optional trailing whitespace)
if (/^```crbasic\s*$/i.test(line.text.trim())) {
if (/^```crbasic\s*$/i.test(trimmed)) {
inCrbasicBlock = true;
contentLines.length = 0;
continue;
}
} else {
// Check for closing fence
if (/^```\s*$/.test(line.text.trim())) {
if (/^```\s*$/.test(trimmed)) {
// Tokenize all collected content lines and add decorations
for (const cl of contentLines) {
const tokens = tokenizeLine(cl.text, cl.from);