fix(search): transform contents before indexing

Resolves WEB-21
This commit is contained in:
taskylizard 2024-08-05 04:04:10 +00:00
parent 3791f3f6d8
commit 7d63a3025a
No known key found for this signature in database
GPG key ID: 1820131ED1A24120
5 changed files with 24 additions and 7 deletions

View file

@ -166,7 +166,7 @@ function getHeader(id: string) {
return header
}
function transformGuide(text: string): string {
export function transformGuide(text: string): string {
const _text = text
.replace(/\[TOC\]\n/gm, '')
.replace(/\*\*Table of Contents\*\*\n\[TOC2\]\n/gm, '')
@ -192,7 +192,7 @@ function replaceUnderscore(text: string): string {
return text
}
function transform(text: string): string {
export function transform(text: string): string {
let _text = text
.replace(
/\*\*\[◄◄ Back to Wiki Index\]\(https:\/\/www\.reddit\.com\/r\/FREEMEDIAHECKYEAH\/wiki\/index\)\*\*\n/gm,