diff --git a/main.ts b/main.ts index acce2bd..f763001 100644 --- a/main.ts +++ b/main.ts @@ -1314,7 +1314,7 @@ export default class QuickLatexPlugin extends Plugin { const letter_after_superscript = editor.getRange( { line: position.line, ch: last_superscript + 1 }, { line: position.line, ch: last_superscript + 2 }); - if (letter_after_superscript == '(' && letter_before_cursor == ')') { + if (letter_after_superscript == '(' && letter_before_cursor == ')' && position.ch-last_superscript > 6) { editor.replaceRange( '}', { line: position.line, ch: position.ch - 1 }, diff --git a/manifest.json b/manifest.json index 64779bd..4cb2128 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "quick-latex", "name": "Quick Latex for Obsidian", - "version": "2.4.0", + "version": "2.5.0", "minAppVersion": "0.9.12", "description": "Speedup latex math typing with auto fraction, align block shortcut, matrix shortcut...etc", "author": "joeyuping", diff --git a/rollup.config.js b/rollup.config.js index 28fc0d5..c409739 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -14,8 +14,8 @@ 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_obsidian', - dir: 'D:/Obsidian/AI/.obsidian/plugins/quick-latex', + dir: 'D:/1 Projects/AI/.obsidian/plugins/quick_latex', + // dir: 'D:/Obsidian/AI/.obsidian/plugins/quick-latex', sourcemap: 'inline', sourcemapExcludeSources: isProd, format: 'cjs',