Skip to content

Commit

Permalink
refactor: use exec instead of match
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Setch <adam.setch@outlook.com>
  • Loading branch information
setchy committed Oct 12, 2024
1 parent 89fdfe6 commit 8c5414a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderer/utils/emojis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ export function convertTextToEmojiImgHtml(text: string): string {
}

function extractSvgFilename(imgHtml: string): string {
const srcMatch = imgHtml.match(/src="(.*)"/);
const srcMatch = /src="(.*)"/.exec(imgHtml);
return path.basename(srcMatch[1]);
}

0 comments on commit 8c5414a

Please sign in to comment.