pillar icon indicating copy to clipboard operation
pillar copied to clipboard

Codeblock hasCaption is not in sync with caption definition

Open Ducasse opened this issue 4 years ago • 0 comments

caption
	^ caption
		ifNil: [ 
			caption := self
				parameters at: 'caption'
				ifPresent: [ :string | (PRDocument parser parse: string) children first ]
				ifAbsent: [ PRParagraph with: (PRText content: '') ] ]
hasCaption
	^ self parameters at: 'caption' 
                      ifPresent: [ :param | param isEmptyOrNil not ] 
                      ifAbsent: [ false ]

param isEmptyOrNil is wrong because the previous method shows that have a PRParagraph

Ducasse avatar May 17 '21 11:05 Ducasse