From e7f2910a51236da9667f80140176c46b0cd2c977 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Tue, 26 Mar 2024 07:08:44 -0500 Subject: [PATCH] Better default for authors. authorsString needs to be refactored. --- src/MiniDocs/Markdeep.class.st | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/MiniDocs/Markdeep.class.st b/src/MiniDocs/Markdeep.class.st index 39e7d82..8ccb46e 100644 --- a/src/MiniDocs/Markdeep.class.st +++ b/src/MiniDocs/Markdeep.class.st @@ -39,14 +39,15 @@ Markdeep >> asMarkdown [ { #category : #'instance creation' } Markdeep >> authors [ - self metadata at: 'authors' ifPresent: [:k | ^ '**', k, '**' ] ifAbsentPut: [ Dictionary new ]. - ^ ''. + self metadata at: 'authors' ifAbsentPut: [ Dictionary new ]. + "self metadata at: 'authors' ifNotEmpty: [:k | ^ '**', k, '**' ] +" ^ ''. ] { #category : #'instance creation' } Markdeep >> authorsString [ self authors - ifNil: [ ^ '' ] ifNotNil: [ ^ ' ', self authors ] + ifEmpty: [ ^ '' ] ifNotEmpty: [ ^ ' ', self authors ] ] { #category : #accessing } @@ -145,7 +146,7 @@ Markdeep >> contents [ output nextPutAll: self headContents; lf; lf; nextPutAll: ' **', self title trimmed accentedCharactersCorrection, '**'; lf; - nextPutAll: self authorsString ; lf; + nextPutAll: self authorsString ; lf; nextPutAll: '', self version; lf; nextPutAll: self navTop; lf; lf; nextPutAll: self body; lf; lf;