update at 2025-09-22 16:49:33

This commit is contained in:
douboer
2025-09-22 16:49:33 +08:00
parent 9b8ec73c83
commit 81c6f52b69
8 changed files with 742 additions and 7 deletions

View File

@@ -43,6 +43,7 @@ export class NMPSettings {
excalidrawToPNG: boolean;
isLoaded: boolean = false;
enableEmptyLine: boolean = false;
enableMarkdownImageToWikilink: boolean = true; // 自动将 ![alt](path/file.ext) 转为 ![[file.ext]]
private static instance: NMPSettings;
@@ -72,6 +73,7 @@ export class NMPSettings {
this.excalidrawToPNG = false;
this.expertSettingsNote = '';
this.enableEmptyLine = false;
this.enableMarkdownImageToWikilink = true;
}
resetStyelAndHighlight() {
@@ -101,6 +103,7 @@ export class NMPSettings {
excalidrawToPNG,
expertSettingsNote,
ignoreEmptyLine,
enableMarkdownImageToWikilink,
} = data;
const settings = NMPSettings.getInstance();
@@ -155,6 +158,9 @@ export class NMPSettings {
if (ignoreEmptyLine !== undefined) {
settings.enableEmptyLine = ignoreEmptyLine;
}
if (enableMarkdownImageToWikilink !== undefined) {
settings.enableMarkdownImageToWikilink = enableMarkdownImageToWikilink;
}
settings.getExpiredDate();
settings.isLoaded = true;
}
@@ -179,6 +185,7 @@ export class NMPSettings {
'excalidrawToPNG': settings.excalidrawToPNG,
'expertSettingsNote': settings.expertSettingsNote,
'ignoreEmptyLine': settings.enableEmptyLine,
'enableMarkdownImageToWikilink': settings.enableMarkdownImageToWikilink,
}
}