Skip to content

Commit

Permalink
fix: match whole string, not include. Fixes #31
Browse files Browse the repository at this point in the history
  • Loading branch information
just4fun committed May 17, 2018
1 parent b60049d commit 54d4229
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/contentParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function parseContentWithEmoji(content, includeEmoji = true) {

return contentEmojiArray.filter(item => item.trim()).map((item, index) => {
// Handle custom emojis.
if (/https?:\/\/.+(?:jpg|png|gif)/.test(item)) {
if (/^https?:\/\/.+(?:jpg|png|gif)$/.test(item)) {
// Exclude custom emoji because copy something like [mobcent_phiz=..]
// is useless as paste content.
if (!includeEmoji) { return ''; }
Expand Down

0 comments on commit 54d4229

Please sign in to comment.