Improving exportation.
This commit is contained in:
parent
882f33859c
commit
78f1b1474f
@ -61,8 +61,8 @@ 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')];
|
loads: #('ALL')];
|
||||||
import: 'LepiterBuildingBlocs'
|
import: 'LepiterBuildingBlocs'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1,5 +1,20 @@
|
|||||||
Extension { #name : #LeTextCoderSnippetElement }
|
Extension { #name : #LeTextCoderSnippetElement }
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LeTextCoderSnippetElement >> asLePage [
|
||||||
|
| currentSnippet newPage |
|
||||||
|
currentSnippet := self snippet.
|
||||||
|
newPage := LePage new.
|
||||||
|
newPage
|
||||||
|
title: (currentSnippet text asString trimLeft: [:char | char = $# ]) trim.
|
||||||
|
self page database
|
||||||
|
addPage: newPage.
|
||||||
|
currentSnippet allChildrenBreadthFirstDo: [:child |
|
||||||
|
child moveToPageTitled: newPage title.
|
||||||
|
].
|
||||||
|
^ newPage
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #'*MiniDocs' }
|
{ #category : #'*MiniDocs' }
|
||||||
LeTextCoderSnippetElement >> moveToPageTitled: pageName [
|
LeTextCoderSnippetElement >> moveToPageTitled: pageName [
|
||||||
| db origin destination |
|
| db origin destination |
|
||||||
|
@ -64,3 +64,15 @@ LeTextSnippet >> taggedWith: aString [
|
|||||||
self metadata at: 'tags' ifPresent: [ (self metadata at: 'tags') add: aString; yourself ] ifAbsentPut: [ Set new ].
|
self metadata at: 'tags' ifPresent: [ (self metadata at: 'tags') add: aString; yourself ] ifAbsentPut: [ Set new ].
|
||||||
^ self metadata at: 'tags'
|
^ self metadata at: 'tags'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
LeTextSnippet >> withFollowingSnippets [
|
||||||
|
"I'm the same method implemented for PharoSnippets,
|
||||||
|
but present also here as a way to improve moving prose snippets from pages.
|
||||||
|
"
|
||||||
|
| snippets stop start |
|
||||||
|
snippets := self parent children asArray.
|
||||||
|
start := snippets indexOf: self.
|
||||||
|
stop := snippets size.
|
||||||
|
^ snippets copyFrom: start to: stop
|
||||||
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user