Improving Markdeep multiline images.
This commit is contained in:
parent
7a7dfa648d
commit
4f849d2e36
@ -2,11 +2,22 @@ Extension { #name : #LePictureSnippet }
|
|||||||
|
|
||||||
{ #category : #'*MiniDocs' }
|
{ #category : #'*MiniDocs' }
|
||||||
LePictureSnippet >> asMarkdeep [
|
LePictureSnippet >> asMarkdeep [
|
||||||
| output |
|
| output curatedCaption captionLines |
|
||||||
|
captionLines := self caption lines.
|
||||||
|
(captionLines size = 1)
|
||||||
|
ifTrue: [ curatedCaption := caption ]
|
||||||
|
ifFalse: [
|
||||||
|
curatedCaption := WriteStream on: ''.
|
||||||
|
curatedCaption nextPutAll: captionLines first.
|
||||||
|
captionLines allButFirstDo: [:line |
|
||||||
|
curatedCaption nextPutAll: ' ', line.
|
||||||
|
curatedCaption := curatedCaption contents.
|
||||||
|
]
|
||||||
|
].
|
||||||
output := WriteStream on: ''.
|
output := WriteStream on: ''.
|
||||||
output
|
output
|
||||||
nextPutAll: self metadataDiv;
|
nextPutAll: self metadataDiv;
|
||||||
nextPutAll: '![ ', self caption ,' ](', self urlString, ')';
|
nextPutAll: '![ ', curatedCaption ,' ](', self urlString, ')';
|
||||||
nextPut: Character lf;
|
nextPut: Character lf;
|
||||||
nextPutAll: '</div>';
|
nextPutAll: '</div>';
|
||||||
nextPut: Character lf;
|
nextPut: Character lf;
|
||||||
|
Loading…
Reference in New Issue
Block a user