Skip to content

Commit

Permalink
Fix #143 by excluding images from embedded blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
reuseman committed Oct 21, 2022
1 parent 680f455 commit 1a381e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "flashcards-obsidian",
"name": "Flashcards",
"version": "1.6.4",
"version": "1.6.5",
"minAppVersion": "0.9.17",
"description": "Anki integration",
"author": "Alex Colucci",
Expand Down
3 changes: 2 additions & 1 deletion src/conf/regex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export class Regex {
this.singleClozeCurly = /((?:{)(?:(\d):?)?(.+?)(?:}))/g;
this.singleClozeHighlight = /((?:==)(.+?)(?:==))/g;

this.embedBlock = /!\[\[(.*?)\]\]/g;
// Matches any embedded block but the one with an used extension from the wikilinks
this.embedBlock = /!\[\[(.*?)(?<!\.(?:png|jpg|jpeg|gif|bmp|svg|tiff|mp3|webm|wav|m4a|ogg|3gp|flac))\]\]/g;
}
}

0 comments on commit 1a381e8

Please sign in to comment.