From a006dbc3990ad86165f34cb7fe3bb705a7aa7eba Mon Sep 17 00:00:00 2001 From: OffrayLuna Date: Fri, 3 Feb 2017 17:36:14 +0000 Subject: [PATCH] Now code blocks which are sucessors of '%invisible' ancestors are not exported in the markdown output. --- src/Grafoscopio/GrafoscopioNode.class.st | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Grafoscopio/GrafoscopioNode.class.st b/src/Grafoscopio/GrafoscopioNode.class.st index c634f7f..9f14ea8 100644 --- a/src/Grafoscopio/GrafoscopioNode.class.st +++ b/src/Grafoscopio/GrafoscopioNode.class.st @@ -560,11 +560,11 @@ GrafoscopioNode >> markdownContent [ markdown nextPutAll: (self body contents withInternetLineEndings); lf; lf. ]. ((self header findString: '%embed') = 1) ifTrue: [ ]. - (self tags = 'invisible') + ((self header findString: '%invisible') = 1) ifTrue: [ invisibleChildren := self children. invisibleChildren ifNotNil: [ ] ]. - (self tags = 'código') ifTrue: [ self exportCodeBlockTo: markdown ]. + ((self tags = 'código') and: [ (self hasAncestorHeaderWith: '%invisible') not ]) ifTrue: [ self exportCodeBlockTo: markdown ]. ^markdown contents ]