From 7ffb2eb4408b96b5f7130197192773f41ebc5053 Mon Sep 17 00:00:00 2001
From: Taloth Saldono <Taloth@users.noreply.github.com>
Date: Wed, 6 May 2020 14:33:14 +0200
Subject: [PATCH] Replaced matchAll usage since it's not available on all
 browsers

---
 frontend/src/Components/Markdown/InlineMarkdown.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/frontend/src/Components/Markdown/InlineMarkdown.js b/frontend/src/Components/Markdown/InlineMarkdown.js
index 2d7df776f..dc9ea9bf3 100644
--- a/frontend/src/Components/Markdown/InlineMarkdown.js
+++ b/frontend/src/Components/Markdown/InlineMarkdown.js
@@ -16,10 +16,11 @@ class InlineMarkdown extends Component {
     // For now only replace links
     const markdownBlocks = [];
     if (data) {
-      const matches = data.matchAll(/\[(.+?)\]\((.+?)\)/g);
-      let endIndex = 0;
+      const regex = RegExp(/\[(.+?)\]\((.+?)\)/g);
 
-      for (const match of matches) {
+      let endIndex = 0;
+      let match = null;
+      while ((match = regex.exec(data)) !== null) {
         if (match.index > endIndex) {
           markdownBlocks.push(data.substr(endIndex, match.index - endIndex));
         }