@uniweb/semantic-parser 1.1.15 → 1.1.16
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/package.json
CHANGED
|
@@ -600,6 +600,7 @@ function parseImgBlock(itemAttrs) {
|
|
|
600
600
|
direction,
|
|
601
601
|
filter,
|
|
602
602
|
alt = "",
|
|
603
|
+
src,
|
|
603
604
|
url,
|
|
604
605
|
href = "",
|
|
605
606
|
target = "",
|
|
@@ -620,8 +621,15 @@ function parseImgBlock(itemAttrs) {
|
|
|
620
621
|
|
|
621
622
|
caption = stripTags(caption);
|
|
622
623
|
|
|
624
|
+
// Standard ProseMirror `image` nodes use `src`; the custom
|
|
625
|
+
// `ImageBlock` node uses `url`. Honor either so callers don't have
|
|
626
|
+
// to pre-normalize. `identifier` (CDN-resolvable asset id) wins
|
|
627
|
+
// when present so an editor-deployed image with a stale `src`
|
|
628
|
+
// doesn't shadow the CDN copy.
|
|
623
629
|
if (identifier) {
|
|
624
630
|
url = makeAssetUrl(imgInfo);
|
|
631
|
+
} else if (!url && src) {
|
|
632
|
+
url = src;
|
|
625
633
|
}
|
|
626
634
|
|
|
627
635
|
return {
|