mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-12 15:57:43 +02:00
Replace em dashes (—) in AniList descriptions
This commit is contained in:
+2
-1
@@ -96,7 +96,8 @@ module.exports = class Util {
|
||||
.replace(/'/g, '\'')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/<\/?i>/g, '*')
|
||||
.replace(/~!|!~/g, '||');
|
||||
.replace(/~!|!~/g, '||')
|
||||
.replace(/—/g, '—');
|
||||
if (clean.length > 2000) clean = `${clean.substr(0, 1995)}...`;
|
||||
const spoilers = (clean.match(/\|\|/g) || []).length;
|
||||
if (spoilers !== 0 && (spoilers && (spoilers % 2))) clean += '||';
|
||||
|
||||
Reference in New Issue
Block a user