Trying to solve invisible nodes by creating 'invisibleChildren' and say to them to do nothing.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2014-11-06 18:53:06 +00:00
parent eccc0ca914
commit 5a8505e394
2 changed files with 5 additions and 19 deletions

View File

@ -250,7 +250,7 @@ GrafoscopioNode >> level: anInteger [
GrafoscopioNode >> markdownContent [ GrafoscopioNode >> markdownContent [
"Extracts the markdown of a node using body as content, header as title and level as hierarchical level of the title. "Extracts the markdown of a node using body as content, header as title and level as hierarchical level of the title.
If special nodes types are present, converts them into proper markup to be embedded inside markdown" If special nodes types are present, converts them into proper markup to be embedded inside markdown"
| markdown configDict specialWords embedNodes temporalBody | | markdown configDict specialWords embedNodes temporalBody invisibleChildren |
markdown := '' writeStream. markdown := '' writeStream.
specialWords := #('%config' '%abstract' '%invisible' '%idea' '%footnote' 'nuevoNodo' '%embed'). specialWords := #('%config' '%abstract' '%invisible' '%idea' '%footnote' 'nuevoNodo' '%embed').
(self level > 0) & (specialWords includes: self header) not & (specialWords includes: ((self header findTokens: $ ) at: 1)) not (self level > 0) & (specialWords includes: self header) not & (specialWords includes: ((self header findTokens: $ ) at: 1)) not
@ -285,8 +285,10 @@ GrafoscopioNode >> markdownContent [
markdown nextPutAll: (self body contents withInternetLineEndings); lf; lf. ]. markdown nextPutAll: (self body contents withInternetLineEndings); lf; lf. ].
((self header findString: '%embed') = 1) ((self header findString: '%embed') = 1)
ifTrue: [ ]. ifTrue: [ ].
(self header = '%invisible') ((self header findString: '%invisible') = 1) | (self header = '%invisible')
ifTrue: [ ]. ifTrue: [
invisibleChildren := self children.
invisibleChildren ifNotNil: [invisibleChildren do: [ ] ] ].
^markdown contents ^markdown contents
] ]

View File

@ -1,16 +0,0 @@
"
An UbakyeBook is a booklet to compile all documentation needed
in the making of the Ubakye outliner and visual data narrative
environment.
"
Class {
#name : #UbakyeBook,
#superclass : #CustomHelp,
#category : #'Grafoscopio-Help'
}
{ #category : #'as yet unclassified' }
UbakyeBook >> bookName [
^'Visual Data Narratives with Pharo/Smalltalk'
]