From 08d859010c80e3cd376e823852b03f1b10a6652a Mon Sep 17 00:00:00 2001 From: EMRAN <139449306+Emran-Y@users.noreply.github.com> Date: Mon, 27 Jul 2026 14:22:37 +0300 Subject: [PATCH] fix: allow award title unbold via custom styles (#3250) (#3257) --- packages/docx/src/section-renderers.ts | 6 +++--- packages/pdf/src/templates/shared/sections.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/docx/src/section-renderers.ts b/packages/docx/src/section-renderers.ts index 65856e52f..5bc298911 100644 --- a/packages/docx/src/section-renderers.ts +++ b/packages/docx/src/section-renderers.ts @@ -78,9 +78,9 @@ function sectionHeading(title: string, colorHex: string): Paragraph { }); } -function titleAndSubtitle(primary: string, secondary: string, rightText?: string): Paragraph { +function titleAndSubtitle(primary: string, secondary: string, rightText?: string, bold = true): Paragraph { const baseRun = getBaseRun(); - const children: (TextRun | ExternalHyperlink)[] = [new TextRun({ text: primary, bold: true, ...baseRun })]; + const children: (TextRun | ExternalHyperlink)[] = [new TextRun({ text: primary, bold, ...baseRun })]; if (secondary) { children.push(new TextRun({ text: ` — ${secondary}`, ...baseRun })); @@ -321,7 +321,7 @@ function renderAwards(section: Sections["awards"], colorHex: string): Paragraph[ const paragraphs: Paragraph[] = [sectionHeading(section.title, colorHex)]; for (const item of items) { - paragraphs.push(titleAndSubtitle(item.title, item.awarder, item.date)); + paragraphs.push(titleAndSubtitle(item.title, item.awarder, item.date, false)); if (item.description) { paragraphs.push(...htmlToParagraphs(item.description, getHtmlStyle())); diff --git a/packages/pdf/src/templates/shared/sections.tsx b/packages/pdf/src/templates/shared/sections.tsx index 7d3811393..abe1a0127 100644 --- a/packages/pdf/src/templates/shared/sections.tsx +++ b/packages/pdf/src/templates/shared/sections.tsx @@ -749,7 +749,7 @@ const AwardsSection = ({ sectionId = "awards", sectionData }: ItemSectionProps - {item.title} + {item.title} {item.date} {item.awarder}