diff --git a/manifest.json b/manifest.json index a26ee6d..bb72758 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "flashcards-obsidian", "name": "Flashcards", - "version": "1.0.3", + "version": "1.0.4", "minAppVersion": "0.9.17", "description": "Anki integration", "author": "Alex Colucci", diff --git a/src/services/parser.ts b/src/services/parser.ts index ba88973..e596cf0 100644 --- a/src/services/parser.ts +++ b/src/services/parser.ts @@ -210,7 +210,7 @@ export class Parser { } private parseLine(str: string, vaultName: string) { - return this.mathToAnki(this.htmlConverter.makeHtml(this.substituteObsidianLinks(this.substituteImageLinks(str), vaultName))) + return this.htmlConverter.makeHtml(this.mathToAnki(this.substituteObsidianLinks(this.substituteImageLinks(str), vaultName))) } private getImageLinks(str: string) { @@ -252,10 +252,10 @@ export class Parser { private mathToAnki(str: string) { let mathBlockRegex = /(\$\$)(.*?)(\$\$)/gi - str = str.replace(mathBlockRegex, '\\($2\\)') + str = str.replace(mathBlockRegex, '\\\\($2\\\\)') let mathInlineRegex = /(\$)(.*?)(\$)/gi - str = str.replace(mathInlineRegex, '\\($2\\)') + str = str.replace(mathInlineRegex, '\\\\($2\\\\)') return str }