Ignore casing in wiki link marking
This commit is contained in:
parent
539f0e5326
commit
6892756397
@ -35,9 +35,9 @@ export function cleanWikiLinkPlugin(editor: Client) {
|
|||||||
cleanPage = page.split("@")[0];
|
cleanPage = page.split("@")[0];
|
||||||
}
|
}
|
||||||
cleanPage = resolvePath(editor.currentPage!, cleanPage);
|
cleanPage = resolvePath(editor.currentPage!, cleanPage);
|
||||||
// console.log("Resolved page", resolvedPage);
|
const lowerCasePageName = cleanPage.toLowerCase();
|
||||||
for (const pageMeta of allPages) {
|
for (const pageMeta of allPages) {
|
||||||
if (pageMeta.name === cleanPage) {
|
if (pageMeta.name.toLowerCase() === lowerCasePageName) {
|
||||||
pageExists = true;
|
pageExists = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -68,13 +68,16 @@ export function createWidgetSandboxIFrame(
|
|||||||
|
|
||||||
iframe.onload = () => {
|
iframe.onload = () => {
|
||||||
iframe.contentDocument!.write(panelHtml);
|
iframe.contentDocument!.write(panelHtml);
|
||||||
// return;
|
|
||||||
|
|
||||||
// Subscribe to message event on global object (to receive messages from iframe)
|
// Subscribe to message event on global object (to receive messages from iframe)
|
||||||
globalThis.addEventListener("message", messageListener);
|
globalThis.addEventListener("message", messageListener);
|
||||||
// Only run this code once
|
// Only run this code once
|
||||||
iframe.onload = null;
|
iframe.onload = null;
|
||||||
Promise.resolve(content).then((content) => {
|
Promise.resolve(content).then((content) => {
|
||||||
|
if (!iframe.contentWindow) {
|
||||||
|
console.warn("Iframe went away or content was not loaded");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (content.html) {
|
if (content.html) {
|
||||||
iframe.contentWindow!.postMessage({
|
iframe.contentWindow!.postMessage({
|
||||||
type: "html",
|
type: "html",
|
||||||
|
Loading…
Reference in New Issue
Block a user