@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.cjs
CHANGED
|
@@ -2639,10 +2639,11 @@ function registered(aliasOrLanguage) {
|
|
|
2639
2639
|
function getDecorations({ doc, name, lowlight, defaultLanguage, }) {
|
|
2640
2640
|
const decorations = [];
|
|
2641
2641
|
core$1.findChildren(doc, node => node.type.name === name).forEach(block => {
|
|
2642
|
+
var _a;
|
|
2642
2643
|
let from = block.pos + 1;
|
|
2643
2644
|
const language = block.node.attrs.language || defaultLanguage;
|
|
2644
2645
|
const languages = lowlight.listLanguages();
|
|
2645
|
-
const nodes = language && (languages.includes(language) || registered(language))
|
|
2646
|
+
const nodes = language && (languages.includes(language) || registered(language) || ((_a = lowlight.registered) === null || _a === void 0 ? void 0 : _a.call(lowlight, language)))
|
|
2646
2647
|
? getHighlightNodes(lowlight.highlight(language, block.node.textContent))
|
|
2647
2648
|
: getHighlightNodes(lowlight.highlightAuto(block.node.textContent));
|
|
2648
2649
|
parseNodes(nodes).forEach(node => {
|