Better default for authors. authorsString needs to be refactored.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2024-03-26 07:08:44 -05:00
parent b4f2564f67
commit e7f2910a51
1 changed files with 5 additions and 4 deletions

View File

@ -39,14 +39,15 @@ Markdeep >> asMarkdown [
{ #category : #'instance creation' } { #category : #'instance creation' }
Markdeep >> authors [ 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' } { #category : #'instance creation' }
Markdeep >> authorsString [ Markdeep >> authorsString [
self authors self authors
ifNil: [ ^ '' ] ifNotNil: [ ^ ' ', self authors ] ifEmpty: [ ^ '' ] ifNotEmpty: [ ^ ' ', self authors ]
] ]
{ #category : #accessing } { #category : #accessing }
@ -145,7 +146,7 @@ Markdeep >> contents [
output output
nextPutAll: self headContents; lf; lf; nextPutAll: self headContents; lf; lf;
nextPutAll: ' **', self title trimmed accentedCharactersCorrection, '**'; lf; nextPutAll: ' **', self title trimmed accentedCharactersCorrection, '**'; lf;
nextPutAll: self authorsString ; lf; nextPutAll: self authorsString ; lf;
nextPutAll: '', self version; lf; nextPutAll: '', self version; lf;
nextPutAll: self navTop; lf; lf; nextPutAll: self navTop; lf; lf;
nextPutAll: self body; lf; lf; nextPutAll: self body; lf; lf;