@tiptap/extension-code-block-lowlight 2.6.5 → 2.7.0-pre.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +2 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/packages/core/src/NodeView.d.ts +20 -8
- package/dist/packages/core/src/index.d.ts +2 -0
- package/dist/packages/core/src/plugins/DropPlugin.d.ts +3 -0
- package/dist/packages/core/src/plugins/PastePlugin.d.ts +3 -0
- package/dist/packages/core/src/types.d.ts +35 -15
- package/package.json +7 -7
- package/src/lowlight-plugin.ts +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -2632,10 +2632,11 @@
|
|
|
2632
2632
|
function getDecorations({ doc, name, lowlight, defaultLanguage, }) {
|
|
2633
2633
|
const decorations = [];
|
|
2634
2634
|
core$1.findChildren(doc, node => node.type.name === name).forEach(block => {
|
|
2635
|
+
var _a;
|
|
2635
2636
|
let from = block.pos + 1;
|
|
2636
2637
|
const language = block.node.attrs.language || defaultLanguage;
|
|
2637
2638
|
const languages = lowlight.listLanguages();
|
|
2638
|
-
const nodes = language && (languages.includes(language) || registered(language))
|
|
2639
|
+
const nodes = language && (languages.includes(language) || registered(language) || ((_a = lowlight.registered) === null || _a === void 0 ? void 0 : _a.call(lowlight, language)))
|
|
2639
2640
|
? getHighlightNodes(lowlight.highlight(language, block.node.textContent))
|
|
2640
2641
|
: getHighlightNodes(lowlight.highlightAuto(block.node.textContent));
|
|
2641
2642
|
parseNodes(nodes).forEach(node => {
|