Skip to content

Commit

Permalink
add support for webp image
Browse files Browse the repository at this point in the history
  • Loading branch information
addozhang committed Nov 7, 2023
1 parent 912ee4a commit 23365f6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"authorUrl": "https://atbug.com",
"isDesktopOnly": true,
"minAppVersion": "0.11.0",
"version": "0.3.2"
"version": "0.3.3"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-image-upload-toolkit",
"version": "0.3.2",
"version": "0.3.3",
"description": "",
"author": "addozhang",
"main": "main.js",
Expand Down
5 changes: 2 additions & 3 deletions src/uploader/imageTagProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import path from "path";
import ImageUploader from "./imageUploader";
import {PublishSettings} from "../publish";

const MD_REGEX = /\!\[(.*)\]\((.*?\.(png|jpg|jpeg|gif|svg|excalidraw))\)/g;
const WIKI_REGEX = /\!\[\[(.*?\.(png|jpg|jpeg|gif|svg|excalidraw))(|.*)?\]\]/g;
const MD_REGEX = /\!\[(.*)\]\((.*?\.(png|jpg|jpeg|gif|svg|webp|excalidraw))\)/g;
const WIKI_REGEX = /\!\[\[(.*?\.(png|jpg|jpeg|gif|svg|webp|excalidraw))(|.*)?\]\]/g;

interface Image {
name: string;
Expand Down Expand Up @@ -100,7 +100,6 @@ export default class ImageTagProcessor {
url: '',
})
}
console.log(images);
return images;
}

Expand Down

0 comments on commit 23365f6

Please sign in to comment.