@tiptap/extension-code-block-lowlight 2.6.6 → 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.js
CHANGED
|
@@ -2631,10 +2631,11 @@ function registered(aliasOrLanguage) {
|
|
|
2631
2631
|
function getDecorations({ doc, name, lowlight, defaultLanguage, }) {
|
|
2632
2632
|
const decorations = [];
|
|
2633
2633
|
findChildren(doc, node => node.type.name === name).forEach(block => {
|
|
2634
|
+
var _a;
|
|
2634
2635
|
let from = block.pos + 1;
|
|
2635
2636
|
const language = block.node.attrs.language || defaultLanguage;
|
|
2636
2637
|
const languages = lowlight.listLanguages();
|
|
2637
|
-
const nodes = language && (languages.includes(language) || registered(language))
|
|
2638
|
+
const nodes = language && (languages.includes(language) || registered(language) || ((_a = lowlight.registered) === null || _a === void 0 ? void 0 : _a.call(lowlight, language)))
|
|
2638
2639
|
? getHighlightNodes(lowlight.highlight(language, block.node.textContent))
|
|
2639
2640
|
: getHighlightNodes(lowlight.highlightAuto(block.node.textContent));
|
|
2640
2641
|
parseNodes(nodes).forEach(node => {
|