fix: eslint fix

This commit is contained in:
Moyasee
2025-10-03 15:57:06 +03:00
parent 2e68018059
commit e3fb325b7b

View File

@@ -1,6 +1,6 @@
function removeZalgoText(text: string): string { function removeZalgoText(text: string): string {
// eslint-disable-next-line no-misleading-character-class
const zalgoRegex = const zalgoRegex =
// eslint-disable-next-line no-misleading-character-class
/[\u0300-\u036F\u1AB0-\u1AFF\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/g; /[\u0300-\u036F\u1AB0-\u1AFF\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/g;
return text.replace(zalgoRegex, ""); return text.replace(zalgoRegex, "");
@@ -8,12 +8,12 @@ function removeZalgoText(text: string): string {
function decodeHtmlEntities(text: string): string { function decodeHtmlEntities(text: string): string {
const entityMap: { [key: string]: string } = { const entityMap: { [key: string]: string } = {
'&': '&', "&": "&",
'&lt;': '<', "&lt;": "<",
'&gt;': '>', "&gt;": ">",
'&quot;': '"', "&quot;": '"',
'&#39;': "'", "&#39;": "'",
'&nbsp;': ' ', "&nbsp;": " ",
}; };
return text.replace(/&[#\w]+;/g, (entity) => { return text.replace(/&[#\w]+;/g, (entity) => {