feat: auto-detect blockquote and table colors from content

Replace manual hashtags and color cycling with content-tone heuristics for blockquotes and tables, and refine blockquote layout with a centered icon, larger sizing, and clearer contrast over background decorations.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
ar.badiei
2026-07-12 01:55:50 +03:30
co-authored by Cursor
parent a47ec493c5
commit 6cb9e2aac5
11 changed files with 370 additions and 64 deletions
+13 -1
View File
@@ -56,13 +56,25 @@ export function buildReleaseParagraph(sections: ChangelogSection[]): string {
return `This release ${rest.join(", ")}, and ${last}.`;
}
function toLatinDigits(value: string): string {
return value.replace(/[\u0660-\u0669\u06f0-\u06f9]/g, (digit) =>
String(
digit.charCodeAt(0) -
(digit <= "\u0669" ? 0x0660 : 0x06f0)
)
);
}
export function formatReleaseDate(date: string): string {
const parsed = new Date(`${date}T00:00:00`);
if (Number.isNaN(parsed.getTime())) return date;
return new Intl.DateTimeFormat("en-US", {
const formatted = new Intl.DateTimeFormat("en-US", {
month: "long",
day: "numeric",
year: "numeric",
numberingSystem: "latn",
}).format(parsed);
return toLatinDigits(formatted);
}