From b9ee04c1e3bcbab47099183567e76c4466a467d3 Mon Sep 17 00:00:00 2001 From: cage Date: Sat, 24 Jun 2023 18:16:12 +0200 Subject: [PATCH] - [GUI] fixed TOC's item number padding. --- src/gui/server/public-api-gemini-stream.lisp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/server/public-api-gemini-stream.lisp b/src/gui/server/public-api-gemini-stream.lisp index dc3d6fe..78b57c1 100644 --- a/src/gui/server/public-api-gemini-stream.lisp +++ b/src/gui/server/public-api-gemini-stream.lisp @@ -441,7 +441,9 @@ #'extract-level #'extract-gid #'extract-header-text)) - (toc-text (mapcar (lambda (a) (getf a :header)) toc)) + (toc-text (mapcar (lambda (a) + (trim-blanks (getf a :header))) + toc)) (longest-text (find-longest-string toc-text)) (max-text-length (length longest-text)) (toc-numbers (mapcar (lambda (a) @@ -452,7 +454,7 @@ (join-with-strings numbers-as-text "."))) toc)) (longest-number (find-longest-string toc-numbers)) - (max-number-length (length longest-number)) + (max-number-length (1+ (length longest-number))) (max-non-padded-text-size (+ max-text-length max-number-length)) (toc-entries-text (loop for text in toc-text