feat(finance): add financial disclosure publishing

This commit is contained in:
2026-08-13 17:17:33 +08:00
parent 39a2e53e61
commit 65d23eab4a
49 changed files with 2096 additions and 3 deletions
+17
View File
@@ -0,0 +1,17 @@
export function htmlToPlainText(html: string): string {
return html
.replace(/<br\s*\/?\s*>/gi, ' ')
.replace(/<[^>]+>/g, '')
.replace(/&nbsp;|&#160;/gi, ' ')
.replace(/&lt;/gi, '<')
.replace(/&gt;/gi, '>')
.replace(/&amp;/gi, '&')
.replace(/&quot;/gi, '"')
.replace(/&#39;|&apos;/gi, "'")
.replace(/\s+/g, ' ')
.trim();
}
export function defaultFinancialSummary(html: string): string {
return htmlToPlainText(html).slice(0, 120);
}