@git-diff-view/shiki
v0.0.20
Published
@git-diff-view/shiki
Downloads
2,287
Maintainers
Readme
shiki highlighter for @git-diff-view
usage
import { DiffFile } from "@git-diff-view/core";
import { highlighterReady } from "@git-diff-view/shiki";
const diffFile = new DiffFile(...params);
diffFile.initRaw();
highlighterReady().then((highlighter) => {
diffFile.initSyntax({ registerHighlighter: highlighter });
diffFile.buildSplitDiffLines();
diffFile.buildUnifiedDiffLines();
setBundle(diffFile.getBundle());
});