From ea9282a3eb4548064ae8a23c6d9bb26490519c79 Mon Sep 17 00:00:00 2001
From: apple502j <33279053+apple502j@users.noreply.github.com>
Date: Wed, 16 Jan 2019 09:15:58 +0900
Subject: [PATCH] Check hashtag after URL
---
src/lib/decorate-text.jsx | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/lib/decorate-text.jsx b/src/lib/decorate-text.jsx
index 78ebec51f..f2df260a2 100644
--- a/src/lib/decorate-text.jsx
+++ b/src/lib/decorate-text.jsx
@@ -30,16 +30,6 @@ module.exports = (text, opts) => {
));
}
- // Match hashtags
- if (opts.hashtags) {
- replacedText = reactStringReplace(replacedText, /#([\w-]+)/g, (match, i) => (
- #{match}
- ));
- }
-
// Match scratch links
/*
Ported from the python...
@@ -71,5 +61,15 @@ module.exports = (text, opts) => {
));
}
+ // Match hashtags
+ if (opts.hashtags) {
+ replacedText = reactStringReplace(replacedText, /#([\w-]+)/g, (match, i) => (
+ #{match}
+ ));
+ }
+
return replacedText;
};