From dce8f59d2f199a9de7fe0ddf422d6b9a1bb28c2c Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 20 Apr 2022 13:56:01 +0200 Subject: [PATCH] removing all unnecessary reference links --- frontend/src/scripts/test/wikipedia.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/src/scripts/test/wikipedia.ts b/frontend/src/scripts/test/wikipedia.ts index ea0c25177..e581da69d 100644 --- a/frontend/src/scripts/test/wikipedia.ts +++ b/frontend/src/scripts/test/wikipedia.ts @@ -97,6 +97,8 @@ export async function getSection(language: string): Promise
{ sectionText = sectionText.replace(/<\/p>

+/g, " "); sectionText = $("

").html(sectionText).text(); + sectionText = sectionText.replace(/\[\d+\]/gi, ""); + sectionText = sectionText.replace(/\s+/g, " "); sectionText = sectionText.trim();