diff --git a/src/BaselineOfMiniDocs/BaselineOfMiniDocs.class.st b/src/BaselineOfMiniDocs/BaselineOfMiniDocs.class.st
index e7fd75b..0bfeaa8 100644
--- a/src/BaselineOfMiniDocs/BaselineOfMiniDocs.class.st
+++ b/src/BaselineOfMiniDocs/BaselineOfMiniDocs.class.st
@@ -13,8 +13,7 @@ BaselineOfMiniDocs >> baseline: spec [
"Dependencies"
self setUpTeapot: spec.
self setUpPetitParser: spec.
- "LepiterBuildingBlocs commented while resolving the conflict with the internal gtoolkit renaming."
- "self setUpLepiterBuildingBlocs: spec"
+ self setUpLepiterBuildingBlocs: spec. "working in v1.0.993"
spec
baseline: 'Mustache' with: [ spec repository: 'github://noha/mustache' ];
baseline: 'Temple' with: [ spec repository: 'github://astares/Pharo-Temple/src' ];
@@ -32,7 +31,8 @@ BaselineOfMiniDocs >> baseline: spec [
'Mustache' 'Temple' "Templating"
'Teapot' 'Tealight' "Web server"
'PetitMarkdown' 'PetitParser' "Parsers"
- 'DataFrame' "Tabular data")].
+ 'DataFrame' "Tabular data"
+ 'LepiterBuildingBlocs' "Lepiter utilities")].
.
"Groups"
@@ -60,11 +60,7 @@ BaselineOfMiniDocs >> semanticVersion [
BaselineOfMiniDocs >> setUpLepiterBuildingBlocs: spec [
spec
baseline: 'LepiterBuildingBlocs'
- with: [spec
- repository: 'github://botwhytho/LepiterBuildingBlocs:main/src';
- loads: #('ALL')];
- import: 'LepiterBuildingBlocs'
-]
+ with: [spec repository: 'github://botwhytho/LepiterBuildingBlocs:main/src']
{ #category : #accessing }
BaselineOfMiniDocs >> setUpPetitParser: spec [
diff --git a/src/MiniDocs/LeTextSnippet.extension.st b/src/MiniDocs/LeTextSnippet.extension.st
index be0f368..0286a8b 100644
--- a/src/MiniDocs/LeTextSnippet.extension.st
+++ b/src/MiniDocs/LeTextSnippet.extension.st
@@ -61,8 +61,7 @@ LeTextSnippet >> parentId [
{ #category : #'*MiniDocs' }
LeTextSnippet >> taggedWith: aString [
- self metadata at: 'tags' ifPresent: [ (self metadata at: 'tags') add: aString; yourself ] ifAbsentPut: [ Set new ].
- ^ self metadata at: 'tags'
+ self tags add: aString.
]
{ #category : #'*MiniDocs' }
diff --git a/src/MiniDocs/LeTextualSnippet.extension.st b/src/MiniDocs/LeTextualSnippet.extension.st
index 55850e5..734fe39 100644
--- a/src/MiniDocs/LeTextualSnippet.extension.st
+++ b/src/MiniDocs/LeTextualSnippet.extension.st
@@ -45,33 +45,8 @@ LeTextualSnippet >> asMarkdownWithMetadataWrappers [
{ #category : #'*MiniDocs' }
LeTextualSnippet >> contentAsStringAnnotated [
- | annotations substitutions exported pageConfig|
- self ast ifNil: [ ^ self contentAsString ].
- annotations := self ast parts select: [:each | each className includesSubstring: 'AnnotationNode' ].
- annotations ifEmpty: [ ^ self contentAsString ].
- substitutions := OrderedDictionary new.
- pageConfig := self page config.
- annotations do: [ :each | | key type value color |
- key := each source.
- type := (key splitOn: ':') first copyWithoutAll: '{{'.
- value := key copyFrom: type size + 4 to: key size - 2.
- pageConfig
- ifNil: [ color := 'default' ]
- ifNotNil: [ | colors |
- colors := pageConfig at: 'annotationColors' ifAbsent: [ nil ].
- colors ifNotNil: [
- color := colors at: type ifAbsent: [ colors at: 'defaultColor' ifAbsentPut: ['default'] ]
- ]
- ].
- substitutions
- at: key
- put: '', value,''.
- ].
- exported := self contentAsString.
- substitutions keysAndValuesDo: [:k :v |
- exported := exported copyReplaceAll: k with: v.
- ].
- ^ exported
+ self ast ifNotNil: [ ^ self processSnippetAnnotations ].
+ ^ self contentAsString
]
{ #category : #'*MiniDocs' }
@@ -81,6 +56,11 @@ LeTextualSnippet >> contentAsStringCustomized [
ifFalse: [ ^ self contentAsString ]
]
+{ #category : #'*MiniDocs' }
+LeTextualSnippet >> extra [
+ ^ self optionAt: 'extra' ifAbsentPut: [ Dictionary new ]
+]
+
{ #category : #'*MiniDocs' }
LeTextualSnippet >> markdeepCustomCloser [
^ ''
@@ -134,9 +114,41 @@ LeTextualSnippet >> metadataUpdate [
at: 'modified' put: self latestEditTime asString;
at: 'creator' put: createEmailSanitized;
at: 'modifier' put: editEmailSanitized;
+ at: 'extra' put: self extra;
yourself
]
+{ #category : #'*MiniDocs' }
+LeTextualSnippet >> processSnippetAnnotations [
+ | exported substitutions annotations pageConfig |
+ annotations := self ast parts
+ select: [ :each | each className includesSubstring: 'AnnotationNode' ].
+ annotations ifEmpty: [ ^ self contentAsString ].
+ substitutions := OrderedDictionary new.
+ pageConfig := self page config.
+ annotations
+ do: [ :each |
+ | key type value color |
+ key := each source.
+ type := (key splitOn: ':') first copyWithoutAll: '{{'.
+ value := key copyFrom: type size + 4 to: key size - 2.
+ pageConfig
+ ifNil: [ color := 'default' ]
+ ifNotNil: [ | colors |
+ colors := pageConfig at: 'annotationColors' ifAbsent: [ nil ].
+ colors
+ ifNotNil: [ color := colors
+ at: type
+ ifAbsent: [ colors at: 'defaultColor' ifAbsentPut: [ 'default' ] ] ] ].
+ substitutions
+ at: key
+ put: '' , value , '' ].
+ exported := self contentAsString.
+ substitutions
+ keysAndValuesDo: [ :k :v | exported := exported copyReplaceAll: k with: v ].
+ ^ exported
+]
+
{ #category : #'*MiniDocs' }
LeTextualSnippet >> sanitizeMetadata [
self options ifNil: [^ self ].
@@ -151,5 +163,5 @@ LeTextualSnippet >> sanitizeMetadata [
{ #category : #'*MiniDocs' }
LeTextualSnippet >> tags [
- ^ self metadata at: 'tags' ifAbsentPut: [ Set new ]
+ ^ self extra at: 'tags' ifAbsentPut: [ Set new ]
]