Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
remove method that was replaced and never removed
Browse files Browse the repository at this point in the history
  • Loading branch information
eggplantzzz committed Jul 14, 2023
1 parent 9729d8b commit 72ff67c
Showing 1 changed file with 0 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,35 +158,6 @@ export function addSyntaxHighlighting(source: Source) {
return processor.stringify(highlighted);
}

export function addMultilineCommentSpans(sourceLines: string[]) {
let inMultilineComment: boolean = false;
const lowlightCommentSpan = `<span class="hljs-comment">`;
const closingSpan = `</span>`;
const sourceWithSpans: string[] = [];
for (const line of sourceLines) {
if (
!inMultilineComment &&
line.includes(lowlightCommentSpan) &&
!line.slice(line.indexOf(lowlightCommentSpan)).includes(closingSpan)
) {
// line where a multiline comment begins with no closing span
inMultilineComment = true;
sourceWithSpans.push(line + closingSpan);
} else if (inMultilineComment && !line.includes(closingSpan)) {
// line in the middle of a multiline comment without closing span
sourceWithSpans.push(lowlightCommentSpan + line + closingSpan);
} else if (inMultilineComment && line.includes(closingSpan)) {
// line where a multiline comment begins
sourceWithSpans.push(lowlightCommentSpan + line);
inMultilineComment = false;
} else {
// line of code not in a multiline comment
sourceWithSpans.push(line);
}
}
return sourceWithSpans;
}

export function replaceTextHighlightedMarkings({
source,
fullyHighlightedLines
Expand Down

0 comments on commit 72ff67c

Please sign in to comment.