Solving sync conflicts.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2024-07-22 19:34:46 -05:00
commit 78900cc64d
3 changed files with 45 additions and 38 deletions

View File

@ -13,8 +13,7 @@ BaselineOfMiniDocs >> baseline: spec [
"Dependencies" "Dependencies"
self setUpTeapot: spec. self setUpTeapot: spec.
self setUpPetitParser: spec. self setUpPetitParser: spec.
"LepiterBuildingBlocs commented while resolving the conflict with the internal gtoolkit renaming." self setUpLepiterBuildingBlocs: spec. "working in v1.0.993"
"self setUpLepiterBuildingBlocs: spec"
spec spec
baseline: 'Mustache' with: [ spec repository: 'github://noha/mustache' ]; baseline: 'Mustache' with: [ spec repository: 'github://noha/mustache' ];
baseline: 'Temple' with: [ spec repository: 'github://astares/Pharo-Temple/src' ]; baseline: 'Temple' with: [ spec repository: 'github://astares/Pharo-Temple/src' ];
@ -32,7 +31,8 @@ BaselineOfMiniDocs >> baseline: spec [
'Mustache' 'Temple' "Templating" 'Mustache' 'Temple' "Templating"
'Teapot' 'Tealight' "Web server" 'Teapot' 'Tealight' "Web server"
'PetitMarkdown' 'PetitParser' "Parsers" 'PetitMarkdown' 'PetitParser' "Parsers"
'DataFrame' "Tabular data")]. 'DataFrame' "Tabular data"
'LepiterBuildingBlocs' "Lepiter utilities")].
. .
"Groups" "Groups"
@ -60,11 +60,7 @@ BaselineOfMiniDocs >> semanticVersion [
BaselineOfMiniDocs >> setUpLepiterBuildingBlocs: spec [ BaselineOfMiniDocs >> setUpLepiterBuildingBlocs: spec [
spec spec
baseline: 'LepiterBuildingBlocs' baseline: 'LepiterBuildingBlocs'
with: [spec with: [spec repository: 'github://botwhytho/LepiterBuildingBlocs:main/src']
repository: 'github://botwhytho/LepiterBuildingBlocs:main/src';
loads: #('ALL')];
import: 'LepiterBuildingBlocs'
]
{ #category : #accessing } { #category : #accessing }
BaselineOfMiniDocs >> setUpPetitParser: spec [ BaselineOfMiniDocs >> setUpPetitParser: spec [

View File

@ -61,8 +61,7 @@ LeTextSnippet >> parentId [
{ #category : #'*MiniDocs' } { #category : #'*MiniDocs' }
LeTextSnippet >> taggedWith: aString [ LeTextSnippet >> taggedWith: aString [
self metadata at: 'tags' ifPresent: [ (self metadata at: 'tags') add: aString; yourself ] ifAbsentPut: [ Set new ]. self tags add: aString.
^ self metadata at: 'tags'
] ]
{ #category : #'*MiniDocs' } { #category : #'*MiniDocs' }

View File

@ -45,33 +45,8 @@ LeTextualSnippet >> asMarkdownWithMetadataWrappers [
{ #category : #'*MiniDocs' } { #category : #'*MiniDocs' }
LeTextualSnippet >> contentAsStringAnnotated [ LeTextualSnippet >> contentAsStringAnnotated [
| annotations substitutions exported pageConfig| self ast ifNotNil: [ ^ self processSnippetAnnotations ].
self ast ifNil: [ ^ self contentAsString ]. ^ 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: '<span st-class="',type,'" style="color:', color, '">', value,'</span>'.
].
exported := self contentAsString.
substitutions keysAndValuesDo: [:k :v |
exported := exported copyReplaceAll: k with: v.
].
^ exported
] ]
{ #category : #'*MiniDocs' } { #category : #'*MiniDocs' }
@ -81,6 +56,11 @@ LeTextualSnippet >> contentAsStringCustomized [
ifFalse: [ ^ self contentAsString ] ifFalse: [ ^ self contentAsString ]
] ]
{ #category : #'*MiniDocs' }
LeTextualSnippet >> extra [
^ self optionAt: 'extra' ifAbsentPut: [ Dictionary new ]
]
{ #category : #'*MiniDocs' } { #category : #'*MiniDocs' }
LeTextualSnippet >> markdeepCustomCloser [ LeTextualSnippet >> markdeepCustomCloser [
^ '' ^ ''
@ -134,9 +114,41 @@ LeTextualSnippet >> metadataUpdate [
at: 'modified' put: self latestEditTime asString; at: 'modified' put: self latestEditTime asString;
at: 'creator' put: createEmailSanitized; at: 'creator' put: createEmailSanitized;
at: 'modifier' put: editEmailSanitized; at: 'modifier' put: editEmailSanitized;
at: 'extra' put: self extra;
yourself 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: '<span st-class="' , type , '" style="color:' , color , '">' , value , '</span>' ].
exported := self contentAsString.
substitutions
keysAndValuesDo: [ :k :v | exported := exported copyReplaceAll: k with: v ].
^ exported
]
{ #category : #'*MiniDocs' } { #category : #'*MiniDocs' }
LeTextualSnippet >> sanitizeMetadata [ LeTextualSnippet >> sanitizeMetadata [
self options ifNil: [^ self ]. self options ifNil: [^ self ].
@ -151,5 +163,5 @@ LeTextualSnippet >> sanitizeMetadata [
{ #category : #'*MiniDocs' } { #category : #'*MiniDocs' }
LeTextualSnippet >> tags [ LeTextualSnippet >> tags [
^ self metadata at: 'tags' ifAbsentPut: [ Set new ] ^ self extra at: 'tags' ifAbsentPut: [ Set new ]
] ]