Ignore non-string signature fold metadata (#1655)

This commit is contained in:
red person
2026-06-03 08:16:48 +03:00
committed by GitHub
parent 96d59d2ff9
commit 116ade4630
2 changed files with 64 additions and 1 deletions

View File

@@ -133,7 +133,7 @@ export function _foldSummary(label, iconSvg, meta) {
// "On <date>, <addr> wrote:". Returns a display string like
// "Jane Doe · Mon, Apr 18, 2026 at 9:31 AM" or `''`.
export function _extractQuoteMeta(html) {
if (!html) return '';
if (typeof html !== 'string' || !html) return '';
const txt = html
.replace(/<style[\s\S]*?<\/style>/gi, '')
.replace(/<[^>]+>/g, ' ')