mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 15:07:42 +02:00
Fix
This commit is contained in:
+2
-3
@@ -1,6 +1,5 @@
|
||||
const crypto = require('crypto');
|
||||
const Entities = require('html-entities').AllHtmlEntities;
|
||||
const entities = new Entities();
|
||||
const { decode: decodeHTML } = require('html-entities');
|
||||
const { stripIndents } = require('common-tags');
|
||||
const { SUCCESS_EMOJI_ID } = process.env;
|
||||
const yes = ['yes', 'y', 'ye', 'yeah', 'yup', 'yea', 'ya', 'hai', 'si', 'sí', 'oui', 'はい', 'correct'];
|
||||
@@ -270,7 +269,7 @@ module.exports = class Util {
|
||||
static cleanAnilistHTML(html, removeLineBreaks = true) {
|
||||
let clean = html;
|
||||
if (removeLineBreaks) clean = clean.replace(/\r|\n|\f/g, '');
|
||||
clean = entities.decode(clean);
|
||||
clean = decodeHTML(clean);
|
||||
clean = clean
|
||||
.replaceAll('<br>', '\n')
|
||||
.replace(/<\/?i>/g, '*')
|
||||
|
||||
Reference in New Issue
Block a user