mirror of
https://github.com/ytliu74/obsidian-pseudocode.git
synced 2026-07-22 07:40:25 +00:00
feat: update auto-completion logic
This commit is contained in:
parent
3084c1ac08
commit
8622d54950
1 changed files with 4 additions and 0 deletions
4
main.ts
4
main.ts
|
|
@ -211,6 +211,10 @@ class PseudocodeSuggestor extends EditorSuggest<string> {
|
|||
// if there is no word, return null
|
||||
if (currentLineLastWordStart === -1) return null;
|
||||
|
||||
// If is within a LaTeX $$ wrap, return null
|
||||
const currentLineLastMoneyMark = currentLineToCursor.lastIndexOf("$");
|
||||
if (currentLineLastMoneyMark != -1) return null;
|
||||
|
||||
const currentFileToCursor = editor.getRange({ line: 0, ch: 0 }, cursor);
|
||||
const indexOfLastCodeBlockStart =
|
||||
currentFileToCursor.lastIndexOf("```");
|
||||
|
|
|
|||
Loading…
Reference in a new issue