Skip to content

Commit 1a381e8

Browse files
author
reuseman
committed
Fix reuseman#143 by excluding images from embedded blocks
1 parent 680f455 commit 1a381e8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "flashcards-obsidian",
33
"name": "Flashcards",
4-
"version": "1.6.4",
4+
"version": "1.6.5",
55
"minAppVersion": "0.9.17",
66
"description": "Anki integration",
77
"author": "Alex Colucci",

src/conf/regex.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ export class Regex {
9595
this.singleClozeCurly = /((?:{)(?:(\d):?)?(.+?)(?:}))/g;
9696
this.singleClozeHighlight = /((?:==)(.+?)(?:==))/g;
9797

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

0 commit comments

Comments
 (0)