chore: auto-fix lint & formatting [skip ci]

This commit is contained in:
github-actions[bot] authored and GitHub committed 2026-10-24 08:42:49 +00:00
1 parent c07741bf54
commit 110e3ae008
2 files changed
+8 -2

No files matched your search

+4 -1
View File
@@ -7,7 +7,10 @@ import { renderNeutralMessage } from "./render";
const markdown = new MarkdownIt({ html: false, linkify: false, breaks: false, typographer: false });
function markdownToText(value: string): string {
return markdown.renderInline(value).replace(/<[^>]*>/gu, "").replace(/</g, "");
return markdown
.renderInline(value)
.replace(/<[^>]*>/gu, "")
.replace(/</g, "");
}
function smallAvatar(url: string): string {
+4 -1
View File
@@ -74,7 +74,10 @@ function capHtml(text: string, max: number): string {
const weight = entity ? 1 : step;
// One character is kept for the ellipsis.
if (shown + weight > max - 1) {
const rest = text.slice(i).replace(/<[^>]*>/g, "").replace(/</g, "");
const rest = text
.slice(i)
.replace(/<[^>]*>/g, "")
.replace(/</g, "");
// What is left fits after all (no ellipsis needed).
if (shown + rest.replace(/&(?:#\d+|#x[0-9a-f]+|[a-z]+);/gi, "x").length <= max) return text;
const closers = [...stack]