diff --git a/src/MiniDocs/LeTextualSnippet.extension.st b/src/MiniDocs/LeTextualSnippet.extension.st
index 0a279e3..6b36d00 100644
--- a/src/MiniDocs/LeTextualSnippet.extension.st
+++ b/src/MiniDocs/LeTextualSnippet.extension.st
@@ -40,17 +40,27 @@ LeTextualSnippet >> asMarkdown [
{ #category : #'*MiniDocs' }
LeTextualSnippet >> contentAsStringAnnotated [
- | annotations substitutions exported |
+ | 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.
- annotations do: [ :each | | key type value |
+ 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: [ 'default' ]
+ ]
+ ].
substitutions
- at: key put: '', value,''.
+ at: key
+ put: '', value,''.
].
exported := self contentAsString.
substitutions keysAndValuesDo: [:k :v |