mirror of
https://github.com/zsviczian/obsidian-excalidraw-plugin.git
synced 2025-08-06 05:46:28 +00:00
two minor errors corrected
This commit is contained in:
@@ -230,7 +230,7 @@ export class ExcalidrawData {
|
||||
//1 2
|
||||
const REG_FILE_BLOCKREF = /(.*)#\^(.*)/g;
|
||||
const parts=text.matchAll(REG_FILE_BLOCKREF).next();
|
||||
if(!parts.value[1] || !parts.value[2]) return text; //filename and/or blockref not found
|
||||
if(parts.done || !parts.value[1] || !parts.value[2]) return text; //filename and/or blockref not found
|
||||
const file = this.app.metadataCache.getFirstLinkpathDest(parts.value[1],this.file.path);
|
||||
const contents = await this.app.vault.cachedRead(file);
|
||||
//get transcluded line and take the part before ^blockref
|
||||
|
||||
@@ -713,7 +713,7 @@ export default class ExcalidrawPlugin extends Plugin {
|
||||
const activeExcalidrawView = self.activeExcalidrawView;
|
||||
const newActiveview:ExcalidrawView = (leaf.view instanceof ExcalidrawView) ? leaf.view as ExcalidrawView : null;
|
||||
if(activeExcalidrawView && activeExcalidrawView != newActiveview) {
|
||||
await activeExcalidrawView.save();
|
||||
await activeExcalidrawView.save(false);
|
||||
if(activeExcalidrawView.file) {
|
||||
self.triggerEmbedUpdates(activeExcalidrawView.file.path);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user