Extension { #name : #LePictureSnippet } { #category : #'*Grafoscopio-Utils-Core' } LePictureSnippet >> asMarkdeep [ | output extraData | output := '' writeStream. output nextPutAll: self metadataDiv; nextPutAll: self centeredFigure; lf; nextPutAll: ''; lf; lf. ^ output contents ] { #category : #'*Grafoscopio-Utils-Core' } LePictureSnippet >> centeredFigure [ ^ '
*' , (self optionAt: 'caption' ifAbsent: [ '' ]) , '*
' ] { #category : #'*Grafoscopio-Utils-Core' } LePictureSnippet >> contentFrom: markdeepDiv [ | caption width | caption := markdeepDiv contentString. width := (markdeepDiv // 'img' @ 'width') stringValue. self optionAt: 'caption' put: caption; optionAt: 'width' put: width. ^ self urlString: (markdeepDiv // 'img' @ 'src') stringValue. ]