@readme/markdown 12.0.0 → 12.0.1
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/main.js
CHANGED
|
@@ -52957,6 +52957,11 @@ const extractText = (node) => {
|
|
|
52957
52957
|
if (node.type === 'text' && typeof node.value === 'string') {
|
|
52958
52958
|
return node.value;
|
|
52959
52959
|
}
|
|
52960
|
+
// When a blockquote contains only an image (no text), treat it as having content
|
|
52961
|
+
// so the blockquote is no longer treated as empty and preserved correctly.
|
|
52962
|
+
if (node.type === 'image') {
|
|
52963
|
+
return typeof node.alt === 'string' && node.alt ? node.alt : '[image]';
|
|
52964
|
+
}
|
|
52960
52965
|
if (node.children && Array.isArray(node.children)) {
|
|
52961
52966
|
return node.children
|
|
52962
52967
|
.map(child => {
|
package/dist/main.node.js
CHANGED
|
@@ -73161,6 +73161,11 @@ const extractText = (node) => {
|
|
|
73161
73161
|
if (node.type === 'text' && typeof node.value === 'string') {
|
|
73162
73162
|
return node.value;
|
|
73163
73163
|
}
|
|
73164
|
+
// When a blockquote contains only an image (no text), treat it as having content
|
|
73165
|
+
// so the blockquote is no longer treated as empty and preserved correctly.
|
|
73166
|
+
if (node.type === 'image') {
|
|
73167
|
+
return typeof node.alt === 'string' && node.alt ? node.alt : '[image]';
|
|
73168
|
+
}
|
|
73164
73169
|
if (node.children && Array.isArray(node.children)) {
|
|
73165
73170
|
return node.children
|
|
73166
73171
|
.map(child => {
|