Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
bcb9fc363e
commit
42e6888157
@@ -316,8 +316,16 @@ export function buildPleadingDoc(input: PleadingInput): Document {
|
||||
|
||||
const bodyParagraphs: Paragraph[] = [];
|
||||
if (input.title) {
|
||||
// Render title as one centered paragraph per manual line; underline only the last line.
|
||||
bodyParagraphs.push(emptyP());
|
||||
bodyParagraphs.push(p(input.title.toUpperCase(), { bold: true, align: AlignmentType.CENTER }));
|
||||
const segments = input.title.toUpperCase().split("\n");
|
||||
const lastIdx = segments.length - 1;
|
||||
segments.forEach((seg, i) => {
|
||||
bodyParagraphs.push(new Paragraph({
|
||||
alignment: AlignmentType.CENTER,
|
||||
children: [run(seg, { bold: true, underline: i === lastIdx })],
|
||||
}));
|
||||
});
|
||||
bodyParagraphs.push(emptyP());
|
||||
}
|
||||
if (input.bodyHtml && input.bodyHtml.trim()) {
|
||||
|
||||
Reference in New Issue
Block a user