prosemirror-highlight
Version:
A ProseMirror plugin to highlight code blocks
15 lines (13 loc) • 413 B
JavaScript
import { t as fillFromRoot } from "./hast-Cn9tqyqN.js";
//#region src/refractor.ts
function createParser(refractor) {
return function highlighter({ content, language, pos }) {
const root = refractor.highlight(content, language || "");
const decorations = [];
fillFromRoot(decorations, root, pos + 1);
return decorations;
};
}
//#endregion
export { createParser };
//# sourceMappingURL=refractor.js.map