@stream-mdx/react 0.2.0 → 0.4.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.
@@ -1534,6 +1534,10 @@ var CodeBlockView = import_react8.default.memo(({ store, blockId, registry }) =>
1534
1534
  return node.block.payload.highlightedHtml;
1535
1535
  }
1536
1536
  if (lines.length > 0) {
1537
+ const hasLineHtml = lines.some((line) => typeof line.html === "string" && line.html.length > 0);
1538
+ if (!hasLineHtml && node.block?.payload.highlightedHtml) {
1539
+ return node.block.payload.highlightedHtml;
1540
+ }
1537
1541
  if (shouldVirtualize) {
1538
1542
  return composeHighlightedHtml(virtualization.window.visibleLines, preAttrs, codeAttrs);
1539
1543
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { C as ComponentRegistry } from '../index-D0akq48G.cjs';
2
+ import { C as ComponentRegistry } from '../index-D2MYusAM.cjs';
3
3
  import { RendererStore } from './store.cjs';
4
4
  import '@stream-mdx/core';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { C as ComponentRegistry } from '../index-D0akq48G.js';
2
+ import { C as ComponentRegistry } from '../index-D2MYusAM.js';
3
3
  import { RendererStore } from './store.js';
4
4
  import '@stream-mdx/core';
5
5
 
@@ -1509,6 +1509,10 @@ var CodeBlockView = React5.memo(({ store, blockId, registry }) => {
1509
1509
  return node.block.payload.highlightedHtml;
1510
1510
  }
1511
1511
  if (lines.length > 0) {
1512
+ const hasLineHtml = lines.some((line) => typeof line.html === "string" && line.html.length > 0);
1513
+ if (!hasLineHtml && node.block?.payload.highlightedHtml) {
1514
+ return node.block.payload.highlightedHtml;
1515
+ }
1512
1516
  if (shouldVirtualize) {
1513
1517
  return composeHighlightedHtml(virtualization.window.visibleLines, preAttrs, codeAttrs);
1514
1518
  }