[FIX] Channel mentions when the slug starts with underscore (#4108)

This commit is contained in:
Danish Ahmed Mirza 2022-05-23 23:35:00 +05:30 committed by GitHub
parent 41721757d0
commit f1f8e9526e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
diff --git a/node_modules/commonmark/lib/inlines.js b/node_modules/commonmark/lib/inlines.js
index 4179cfd..478bbd5 100644
--- a/node_modules/commonmark/lib/inlines.js
+++ b/node_modules/commonmark/lib/inlines.js
@@ -996,7 +996,7 @@ var parseEmail = function(block) {
}
}
-var reHashtag = XRegExp.cache('^#(\\pL[\\pL\\d\\-_.]*[\\pL\\d])');
+var reHashtag = XRegExp.cache('^#([\\pL\\d\\-_.]*[\\pL\\d])');
var parseHashtag = function(block) {
if (this.brackets) {
// Don't perform autolinking while inside an explicit link