From 8cd21fdcda66b045576c7e64715034c44ce3b28c Mon Sep 17 00:00:00 2001 From: OffrayLuna Date: Thu, 6 Nov 2014 18:53:06 +0000 Subject: [PATCH] Trying to solve invisible nodes by creating 'invisibleChildren' and say to them to do nothing. --- src/Grafoscopio/GrafoscopioNode.class.st | 8 +++++--- src/Grafoscopio/UbakyeBook.class.st | 16 ---------------- 2 files changed, 5 insertions(+), 19 deletions(-) delete mode 100644 src/Grafoscopio/UbakyeBook.class.st diff --git a/src/Grafoscopio/GrafoscopioNode.class.st b/src/Grafoscopio/GrafoscopioNode.class.st index 0d1cdf5..d26a822 100644 --- a/src/Grafoscopio/GrafoscopioNode.class.st +++ b/src/Grafoscopio/GrafoscopioNode.class.st @@ -250,7 +250,7 @@ GrafoscopioNode >> level: anInteger [ GrafoscopioNode >> markdownContent [ "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" - | markdown configDict specialWords embedNodes temporalBody | + | markdown configDict specialWords embedNodes temporalBody invisibleChildren | markdown := '' writeStream. specialWords := #('%config' '%abstract' '%invisible' '%idea' '%footnote' 'nuevoNodo' '%embed'). (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. ]. ((self header findString: '%embed') = 1) ifTrue: [ ]. - (self header = '%invisible') - ifTrue: [ ]. + ((self header findString: '%invisible') = 1) | (self header = '%invisible') + ifTrue: [ + invisibleChildren := self children. + invisibleChildren ifNotNil: [invisibleChildren do: [ ] ] ]. ^markdown contents ] diff --git a/src/Grafoscopio/UbakyeBook.class.st b/src/Grafoscopio/UbakyeBook.class.st deleted file mode 100644 index ea6a539..0000000 --- a/src/Grafoscopio/UbakyeBook.class.st +++ /dev/null @@ -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' -]