From a4ce7371ca132f52a446f29ef4d9d5adc61278da Mon Sep 17 00:00:00 2001
From: George Goldberg <george@gberg.me>
Date: Tue, 8 Aug 2017 09:58:28 +0100
Subject: Revert "PLT-6609: Don't highlight #hashtag.dot when searching for
 #hashtag (#7109)" (#7147)

This reverts commit f4638aecec2933f20efb4b95c2e0a90c22b47b43.
---
 webapp/utils/markdown.jsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'webapp/utils/markdown.jsx')

diff --git a/webapp/utils/markdown.jsx b/webapp/utils/markdown.jsx
index d424d9544..8733e6200 100644
--- a/webapp/utils/markdown.jsx
+++ b/webapp/utils/markdown.jsx
@@ -175,7 +175,7 @@ class MattermostMarkdownRenderer extends marked.Renderer {
 
         if (this.formattingOptions.searchPatterns) {
             for (const pattern of this.formattingOptions.searchPatterns) {
-                if (pattern.pattern.test(href)) {
+                if (pattern.test(href)) {
                     output += ' search-highlight';
                     break;
                 }
@@ -189,7 +189,7 @@ class MattermostMarkdownRenderer extends marked.Renderer {
         if (this.formattingOptions.siteURL) {
             const pattern = new RegExp('^' + TextFormatting.escapeRegex(this.formattingOptions.siteURL) + '\\/(?:signup_user_complete|[^\\/]+\\/(?:pl|channels))\\/');
 
-            internalLink = pattern.pattern.test(outHref);
+            internalLink = pattern.test(outHref);
         }
 
         if (internalLink) {
-- 
cgit v1.2.3-1-g7c22

