From fda9ef6c63df0dc189895e958035b2f2a6c34424 Mon Sep 17 00:00:00 2001 From: brecert <11599528+Brecert@users.noreply.github.com> Date: Wed, 13 Nov 2019 10:49:43 -0500 Subject: [PATCH 1/2] customEmoji parser id fix --- src/utils/markdown-rules/customEmoji.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { From abd12eac97419210c602b48de74759d9042e73a4 Mon Sep 17 00:00:00 2001 From: brecert <11599528+Brecert@users.noreply.github.com> Date: Wed, 13 Nov 2019 13:41:30 -0500 Subject: [PATCH 2/2] fixed link parsing --- src/utils/markdown-rules/link.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 }