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