@oml/markdown 0.16.2 → 0.16.4
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/out/renderers/diagram-renderer.js +12 -1
- package/out/renderers/diagram-renderer.js.map +1 -1
- package/out/static/browser-runtime.bundle.js +56 -11
- package/out/static/browser-runtime.bundle.js.map +2 -2
- package/out/static/browser-runtime.js +46 -10
- package/out/static/browser-runtime.js.map +1 -1
- package/package.json +2 -2
- package/src/renderers/diagram-renderer.ts +11 -1
- package/src/static/browser-runtime.ts +46 -10
|
@@ -2792,7 +2792,18 @@ function normalizeImageHref(href) {
|
|
|
2792
2792
|
return href;
|
|
2793
2793
|
}
|
|
2794
2794
|
try {
|
|
2795
|
-
|
|
2795
|
+
const params = new URLSearchParams(window.location.search);
|
|
2796
|
+
const isPreviewFrame = params.get('_oml_preview') === '1';
|
|
2797
|
+
let baseHref = document.baseURI || window.location.href;
|
|
2798
|
+
if (isPreviewFrame && window.parent && window.parent !== window) {
|
|
2799
|
+
try {
|
|
2800
|
+
baseHref = window.parent.document.baseURI || window.parent.location.href || baseHref;
|
|
2801
|
+
}
|
|
2802
|
+
catch {
|
|
2803
|
+
// Ignore cross-origin access errors and keep current document base.
|
|
2804
|
+
}
|
|
2805
|
+
}
|
|
2806
|
+
return new URL(href, baseHref).toString();
|
|
2796
2807
|
}
|
|
2797
2808
|
catch {
|
|
2798
2809
|
return href;
|