Skip to content

Commit

Permalink
Merge pull request #760 from obgnail/dev
Browse files Browse the repository at this point in the history
fix resourceOperation: support <>
  • Loading branch information
obgnail authored Sep 22, 2024
2 parents 2acf1a8 + 67a7040 commit bd92093
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugin/custom/plugins/resourceOperation.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,10 @@ Designed with ♥ by [obgnail](https://github.com/obgnail/typora_plugin)
const collectMatch = content => {
return Promise.all(content.matchAll(this.regexp).map(async match => {
let src = match.groups.src1 || match.groups.src2;
if (!src || isNetworkImage(src) || isSpecialImage(src)) return;
if (!src) return;

src = src.trim().replace(/^</, "").replace(/>$/, "").trim();
if (isNetworkImage(src) || isSpecialImage(src)) return;

try {
src = decodeURIComponent(src).split("?")[0];
Expand Down

0 comments on commit bd92093

Please sign in to comment.