mirror of
https://github.com/utleysam/codeblock-crbasic.git
synced 2026-07-22 07:32:57 +00:00
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:
parent
a7a6e302bf
commit
ccb26bebdc
1 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue