Skip to content

Commit

Permalink
Small cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mayurankv committed Jul 11, 2023
1 parent 6e416d7 commit e04fcde
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/EditingView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export function createCodeblockCodeMirrorExtensions(settings: CodeStylerSettings
return Decoration.none;
},
update(value: DecorationSet, transaction: Transaction): DecorationSet {
value = value.map(transaction.changes)
value = value.map(transaction.changes);
const uncollapseAnnotation = transaction.annotation(temporaryUncollapseAnnotation);
if (uncollapseAnnotation) {
if (uncollapseAnnotation.uncollapse)
Expand Down Expand Up @@ -573,11 +573,9 @@ function languageHighlight({start,text,language}: {start: number, text: string,
//NOTE: Uses codemirror 6 implementation which Obsidian does not currently use
let markDecorations: Array<Range<Decoration>> = [];
const tree = loadedLanguages[language].language.parser.parse(text);
let pos: number;
highlightTree(tree,classHighlighter,(from,to,token) => { //todo (@mayurankv) Change this highlighter
if (token)
markDecorations.push({from: start+from, to: start+to, value: Decoration.mark({class: token})});
pos = to;
});
return markDecorations;
}
Expand Down

0 comments on commit e04fcde

Please sign in to comment.