mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-30 14:21:04 +00:00
fix: eslint fix
This commit is contained in:
@@ -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 } = {
|
||||||
'&': '&',
|
"&": "&",
|
||||||
'<': '<',
|
"<": "<",
|
||||||
'>': '>',
|
">": ">",
|
||||||
'"': '"',
|
""": '"',
|
||||||
''': "'",
|
"'": "'",
|
||||||
' ': ' ',
|
" ": " ",
|
||||||
};
|
};
|
||||||
|
|
||||||
return text.replace(/&[#\w]+;/g, (entity) => {
|
return text.replace(/&[#\w]+;/g, (entity) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user