@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.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 => {