diff --git a/src/BaselineOfMiniDocs/BaselineOfMiniDocs.class.st b/src/BaselineOfMiniDocs/BaselineOfMiniDocs.class.st index 77f8455..6fd925d 100644 --- a/src/BaselineOfMiniDocs/BaselineOfMiniDocs.class.st +++ b/src/BaselineOfMiniDocs/BaselineOfMiniDocs.class.st @@ -26,7 +26,7 @@ BaselineOfMiniDocs >> baseline: spec [ { #category : #accessing } BaselineOfMiniDocs >> semanticVersion [ - ^ '0.1.1' + ^ '0.2.0' ] { #category : #accessing } diff --git a/src/MiniDocs/LeYoutubeReferenceSnippet.extension.st b/src/MiniDocs/LeYoutubeReferenceSnippet.extension.st new file mode 100644 index 0000000..172d2ff --- /dev/null +++ b/src/MiniDocs/LeYoutubeReferenceSnippet.extension.st @@ -0,0 +1,47 @@ +Extension { #name : #LeYoutubeReferenceSnippet } + +{ #category : #'*MiniDocs' } +LeYoutubeReferenceSnippet >> asMarkdeep [ + | output | + output := WriteStream on: ''. + output + nextPutAll: self metadataDiv; + nextPutAll: '![ ', self title, ' | ', self authorName, ' ](',self urlString, ')'; + nextPut: Character lf; + nextPutAll: ''; + nextPut: Character lf; + nextPut: Character lf. + ^ output contents +] + +{ #category : #'*MiniDocs' } +LeYoutubeReferenceSnippet >> metadata [ + ^ self optionAt: 'metadata' ifAbsentPut: [ self metadataInit ] +] + +{ #category : #'*MiniDocs' } +LeYoutubeReferenceSnippet >> metadataDiv [ + | output | + output := WriteStream on: ''. + output + nextPutAll: '
'. + ^ output. +] + +{ #category : #'*MiniDocs' } +LeYoutubeReferenceSnippet >> metadataInit [ + | surrogate | + self parent + ifNil: [ surrogate := nil] + ifNotNil: [ surrogate := self parent uidString ]. + ^ OrderedDictionary new + at: 'id' put: self uidString; + at: 'parent' put: surrogate; + at: 'created' put: self createTime asString; + at: 'modified' put: self latestEditTime asString; + at: 'creator' put: self createEmail asString; + at: 'modifier' put: self editEmail asString; + yourself +]