FIX: Hashtags should work for non-english characters

FIX: Hashtags should work for non-english characters

diff --git a/app/assets/javascripts/pretty-text/engines/discourse-markdown/category-hashtag.js.es6 b/app/assets/javascripts/pretty-text/engines/discourse-markdown/category-hashtag.js.es6
index e37f906..5e997df 100644
--- a/app/assets/javascripts/pretty-text/engines/discourse-markdown/category-hashtag.js.es6
+++ b/app/assets/javascripts/pretty-text/engines/discourse-markdown/category-hashtag.js.es6
@@ -44,7 +44,7 @@ function addHashtag(buffer, matches, state) {
 export function setup(helper) {
   helper.registerPlugin(md => {
     const rule = {
-      matcher: /#([\w-:]{1,101})/,
+      matcher: /#([\u00C0-\u1FFF\u2C00-\uD7FF\w-:]{1,101})/,
       onMatch: addHashtag
     };
 
diff --git a/test/javascripts/lib/pretty-text-test.js.es6 b/test/javascripts/lib/pretty-text-test.js.es6
index 32670c4..162ef49 100644
--- a/test/javascripts/lib/pretty-text-test.js.es6
+++ b/test/javascripts/lib/pretty-text-test.js.es6
@@ -621,6 +621,12 @@ QUnit.test("Category hashtags", assert => {
     '<p><small><span class="hashtag">#category-hashtag</span></small></p>',
     "it works between HTML tags"
   );
+
+  assert.cooked(
+    "Checkout #ụdị",
+    '<p>Checkout <span class="hashtag">#ụdị</span></p>',
+    "it works for non-english characters"
+  );
 });
 
 QUnit.test("Heading", assert => {

GitHub
sha: 2076f371