mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-22 18:29:14 +02:00
Replace em dashes (—) in AniList descriptions
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "107.4.0",
|
"version": "107.4.1",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
+2
-1
@@ -96,7 +96,8 @@ module.exports = class Util {
|
|||||||
.replace(/'/g, '\'')
|
.replace(/'/g, '\'')
|
||||||
.replace(/"/g, '"')
|
.replace(/"/g, '"')
|
||||||
.replace(/<\/?i>/g, '*')
|
.replace(/<\/?i>/g, '*')
|
||||||
.replace(/~!|!~/g, '||');
|
.replace(/~!|!~/g, '||')
|
||||||
|
.replace(/—/g, '—');
|
||||||
if (clean.length > 2000) clean = `${clean.substr(0, 1995)}...`;
|
if (clean.length > 2000) clean = `${clean.substr(0, 1995)}...`;
|
||||||
const spoilers = (clean.match(/\|\|/g) || []).length;
|
const spoilers = (clean.match(/\|\|/g) || []).length;
|
||||||
if (spoilers !== 0 && (spoilers && (spoilers % 2))) clean += '||';
|
if (spoilers !== 0 && (spoilers && (spoilers % 2))) clean += '||';
|
||||||
|
|||||||
Reference in New Issue
Block a user