g
This commit is contained in:
parent
61c8a8de01
commit
45160d8df8
1 changed files with 2 additions and 2 deletions
|
@ -55,14 +55,14 @@ function notEmpty(str) {
|
||||||
|
|
||||||
const regexCutTags = /[\S\s]{1,875}[^,]{0,25}/;
|
const regexCutTags = /[\S\s]{1,875}[^,]{0,25}/;
|
||||||
function formatTags(tags) {
|
function formatTags(tags) {
|
||||||
const tagString = decode(tags.map(escapeMarkdown).join(', '));
|
const tagString = decode(tags.join(', '));
|
||||||
|
|
||||||
if (tagString.length < 500) {
|
if (tagString.length < 500) {
|
||||||
return tagString;
|
return tagString;
|
||||||
}
|
}
|
||||||
|
|
||||||
const tagCutMatch = tagString.match(regexCutTags) ?? [];
|
const tagCutMatch = tagString.match(regexCutTags) ?? [];
|
||||||
return `${escapeMarkdown(tagCutMatch[0] ?? '')}, ...`;
|
return `\`${escapeMarkdown(tagCutMatch[0] ?? '')}, ...\``;
|
||||||
}
|
}
|
||||||
|
|
||||||
var credentials = JSON.parse(readFileSync("config/credentials.json"));
|
var credentials = JSON.parse(readFileSync("config/credentials.json"));
|
||||||
|
|
Loading…
Reference in a new issue