Skip to content

Commit 580c508

Browse files
authored
fix: fix image match regex (#151)
1 parent 2b996cb commit 580c508

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/images-extractor.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export interface ImageInformation {
1717

1818
export type ImageInformationArray = ImageInformation[];
1919

20-
const markdownImageRegex = /(!\[.*?\])\((.*?)( {0,}["'].*?['"])?\)/g;
20+
const markdownImageRegex = /(!\[.*?\])\((.+?\.(?:png|jpg|webp|svg|gif))['"]?\)/g;
2121
const cnblogsImageLinkRegex = /\.cnblogs\.com\//;
2222

2323
interface ImageTypeFilter {

0 commit comments

Comments
 (0)