Improving LeSnippet to LePage conversion.
This commit is contained in:
parent
13f9b8050e
commit
573c929845
@ -2,9 +2,14 @@ Extension { #name : #LeTextSnippet }
|
||||
|
||||
{ #category : #'*MiniDocs' }
|
||||
LeTextSnippet >> asLePage [
|
||||
| page |
|
||||
| page title currentSnippet |
|
||||
title := self contentAsString markdownHeaders associations first value.
|
||||
title := (title trimBoth: [:char | char = $# ]) trimmed.
|
||||
page := LePage new
|
||||
initializeTitle: self contentAsString.
|
||||
initializeTitle: title.
|
||||
currentSnippet := LeTextSnippet new
|
||||
string: self contentAsString.
|
||||
page addSnippet: currentSnippet.
|
||||
self database addPage: page.
|
||||
self childrenDo: [:child |
|
||||
child moveToPageTitled: page title
|
||||
|
Loading…
Reference in New Issue
Block a user