Skip to content

Commit

Permalink
2.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyuping committed May 29, 2023
1 parent 3d4b7cb commit d031fc1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
10 changes: 4 additions & 6 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,6 @@ export default class QuickLatexPlugin extends Plugin {
]));

async onload() {
console.log('loading Quick-Latex plugin');

this.registerEditorExtension(this.makeExtensionThing());

Expand All @@ -836,11 +835,11 @@ export default class QuickLatexPlugin extends Plugin {
shorthands = shorthands.slice(0,-1)
}
if(shorthands.lastIndexOf(";\n")==-1){
this.shorthand_array = shorthands.split(",").map(item=>item.split(":").map(item=>item.trim()));
this.shorthand_array = shorthands.split(",").map(item=>item.split(":"));
} else if (shorthands.lastIndexOf(":::")==-1) {
this.shorthand_array = shorthands.split(";\n").map(item=>item.split(":"));
} else {
this.shorthand_array = shorthands.split(";\n").map(item=>item.split(":::").map(item=>item.trim()));
this.shorthand_array = shorthands.split(";\n").map(item=>item.split(":::"));
}

// preprocess autoAlign array
Expand Down Expand Up @@ -1920,7 +1919,6 @@ export default class QuickLatexPlugin extends Plugin {
};

public onunload(): void {
console.log('unloading Quick-Latex plugin');

this.app.workspace.iterateCodeMirrors((cm) => {
cm.off('vim-mode-change', this.handleVimModeChange);
Expand Down Expand Up @@ -2215,11 +2213,11 @@ class QuickLatexSettingTab extends PluginSettingTab {
value = value.slice(0,-1)
}
if(value.lastIndexOf(";\n")==-1){
this.plugin.shorthand_array = value.split(",").map(item=>item.split(":").map(item=>item.trim()));
this.plugin.shorthand_array = value.split(",").map(item=>item.split(":"));
} else if (value.lastIndexOf(":::")==-1) {
this.plugin.shorthand_array = value.split(";\n").map(item=>item.split(":"));
} else {
this.plugin.shorthand_array = value.split(";\n").map(item=>item.split(":::").map(item=>item.trim()));
this.plugin.shorthand_array = value.split(";\n").map(item=>item.split(":::"));
}

await this.plugin.saveData(this.plugin.settings);
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "quick-latex",
"name": "Quick Latex for Obsidian",
"version": "2.6.1",
"version": "2.6.2",
"minAppVersion": "0.9.12",
"description": "Speedup latex math typing with auto fraction, align block shortcut, matrix shortcut...etc",
"author": "joeyuping",
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if you want to view the source visit the plugins github repository
export default {
input: 'main.ts',
output: {
dir: 'D:/1 Projects/AI/.obsidian/plugins/quick-latex',
dir: 'D:/Obsidian/AI/.obsidian/plugins/quick-latex',
// dir: 'D:/Obsidian/AI/.obsidian/plugins/quick-latex',
sourcemap: 'inline',
sourcemapExcludeSources: isProd,
Expand Down

0 comments on commit d031fc1

Please sign in to comment.