diff --git a/src/main/core/org/kissweb/Groff.java b/src/main/core/org/kissweb/Groff.java index e1f460a..db59778 100644 --- a/src/main/core/org/kissweb/Groff.java +++ b/src/main/core/org/kissweb/Groff.java @@ -376,9 +376,11 @@ private void writePageHeader(String title) { pw.println("'tl '''" + DateTime.currentDateTimeFormattedTZ() + "'"); else if (!runDate.isEmpty()) pw.println("'tl '''" + runDate + "'"); - pw.println("'ce " + (1 + pageTitleLines.size())); - if (title != null && !title.isEmpty()) + if (title != null && !title.isEmpty()) { + pw.println("'ce " + (1 + pageTitleLines.size())); pw.println(title); + } else if (!pageTitleLines.isEmpty()) + pw.println("'ce " + pageTitleLines.size()); for (String line : pageTitleLines) pw.println(line); pw.println("'SP");