We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8350113 commit 9922b1bCopy full SHA for 9922b1b
src/plugins/embedTweaks.ts
@@ -6,7 +6,7 @@ export const gifEmbed: IPlugin = {
6
{
7
// I once saw a gif coming from Notion that wasn't a full
8
// url, which wouldn't work, hence the "http" requirement
9
- regex: /\[.*\]\((http.*(\.(gif|GIF)))\)/,
+ regex: /\[.*?\]\((http.*?(\.(gif|GIF)))\)/,
10
replacementPattern: ``,
11
},
12
],
@@ -16,7 +16,7 @@ export const imgurGifEmbed: IPlugin = {
16
name: "imgur",
17
regexMarkdownModifications: [
18
19
- regex: /\[.*\]\((.*imgur\.com\/.*)\)/, // imgur.com
+ regex: /\[.*?\]\((.*?imgur\.com\/.*?)\)/, // imgur.com
20
// imgur links to gifs need a .gif at the end, but the url they give you doesn't have one.
21
replacementPattern: ``,
22
0 commit comments