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