Starting to use snippet builders to populate the page.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-02-05 18:20:48 -05:00
parent 27deeed6b3
commit 4daeb295a2

View File

@ -101,12 +101,13 @@ LePage >> options [
{ #category : #'*Grafoscopio-Utils-Core' }
LePage >> populateChildrenFrom: docTreeDivs [
docTreeDivs doWithIndex: [:div :i | | snippet parent |
snippet := LeSnippet fromMetaMarkdeep:div.
self children
addSnippet: snippet beforeIndex: i.
parent := self detectSnippetWithUid: (snippet metadata at: 'parent').
snippet parent: parent.
docTreeDivs doWithIndex: [:div :i | | snippetTemp "parent surrogate" |
snippetTemp := LeSnippet fromMetaMarkdeep:div.
"self children
addSnippet: snippet beforeIndex: i."
self snippetBuilder snippet: snippetTemp; add.
"surrogate := self detectSnippetWithUid: (snippetTemp metadata at: 'parent').
parent := self snippetBuilder snippet: surrogate."
]
]