mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Replace em dashes (—) in AniList descriptions
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "107.4.0",
|
||||
"version": "107.4.1",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
+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