Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
non ascii
Browse files Browse the repository at this point in the history
emmerich committed Apr 13, 2024
1 parent b89e4f6 commit d3ee8de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/DocumentView/CodeBlock/highlight.ts
Original file line number Diff line number Diff line change
@@ -73,7 +73,7 @@ export async function highlight(block: DocumentBlockCode): Promise<HighlightLine
lineCount += block.nodes.length;


const lines = highlighter.codeToTokensBase(code.replace('\\', ''), {
const lines = highlighter.codeToTokensBase(code.replace('\\', '').replaceAll(/[^\x00-\x7F]+/gi, ''), {
lang: langName,
tokenizeMaxLineLength: 120,
});

0 comments on commit d3ee8de

Please sign in to comment.