Fix #20. Ignore embedding svg.

This commit is contained in:
GnoxNahte 2024-12-18 22:21:47 +08:00
parent ffe1b0b811
commit 8e2d4f0ae7
5 changed files with 11 additions and 6 deletions

View file

@ -51,7 +51,7 @@ body:
description: |
What Auto Embed version are you using?
If left blank, I will assume you're on the latest version
placeholder: 1.2.4
placeholder: 1.2.5
- type: dropdown
id: os
attributes:

View file

@ -18,6 +18,10 @@ Things to remember:
- Try to check all the links link to a valid location
-->
## [1.2.4](https://github.com/GnoxNahte/obsidian-auto-embed/tree/1.2.4) (2024-10-28)
**Bugs Fixed:**
- Fix [Issue 20](https://github.com/GnoxNahte/obsidian-auto-embed/issues/20#issuecomment-2551178504): Ignore embedding svg.
## [1.2.4](https://github.com/GnoxNahte/obsidian-auto-embed/tree/1.2.4) (2024-10-28)
**Bugs Fixed:**

View file

@ -1,11 +1,11 @@
{
"id": "auto-embed",
"name": "Auto Embed",
"version": "1.2.4",
"version": "1.2.5",
"minAppVersion": "1.5.11",
"description": "Helps to embed links using markdown instead of iframe",
"description": "Helps to embed links using markdown instead of iframe.",
"author": "GnoxNahte",
"authorUrl": "https://gnoxnahte.com",
"authorUrl": "https://gnoxnahte.dev",
"fundingUrl": "https://ko-fi.com/gnoxnahtedev",
"isDesktopOnly": false
}

View file

@ -14,7 +14,7 @@ export function isURL(str: string) : boolean {
export function isLinkToImage(str: string) : boolean {
const url = new URL(str);
return /\.(jpg|jpeg|png|webp|avif|gif)$/.test(url.pathname);
return /\.(jpg|jpeg|png|webp|avif|gif|svg)$/.test(url.pathname);
}
export interface Dictionary<T> {

View file

@ -15,5 +15,6 @@
"1.2.1": "1.5.11",
"1.2.2": "1.5.11",
"1.2.3": "1.5.11",
"1.2.4": "1.5.11"
"1.2.4": "1.5.11",
"1.2.5": "1.5.11"
}