diff --git a/src/utils/markdown-rules/customEmoji.js b/src/utils/markdown-rules/customEmoji.js index 626468a..5002305 100644 --- a/src/utils/markdown-rules/customEmoji.js +++ b/src/utils/markdown-rules/customEmoji.js @@ -4,7 +4,7 @@ import config from "@/config.js"; export default (order) => { return { order: order++, match: function(source) { - return /^<:([\w\d_]+):([\w\d_]+)>/.exec(source) + return /^<:([\w\d_-]+):([\w\d_-]+)>/.exec(source) }, parse: function(capture, parse, state) { diff --git a/src/utils/markdown-rules/link.js b/src/utils/markdown-rules/link.js index 423bd2a..51f7362 100644 --- a/src/utils/markdown-rules/link.js +++ b/src/utils/markdown-rules/link.js @@ -8,7 +8,11 @@ export default (order) => { return { match: function(source) { const match = linkify.match(source) - if(match === null) { + if( + match === null || + match[0].index !== 0 || + match.length === 0 + ) { return null }