diff --git a/repository/Grafoscopio/GrafoscopioNode.class.st b/repository/Grafoscopio/GrafoscopioNode.class.st index d26a822..7f1d8a9 100644 --- a/repository/Grafoscopio/GrafoscopioNode.class.st +++ b/repository/Grafoscopio/GrafoscopioNode.class.st @@ -86,7 +86,9 @@ GrafoscopioNode >> asMarkdown [ | markdownOutput | markdownOutput := '' writeStream. - (self preorderTraversal) do: [ :eachNode | markdownOutput nextPutAll: (eachNode markdownContent) ]. + "(self preorderTraversal) do: [ :eachNode | markdownOutput nextPutAll: (eachNode markdownContent) ]." + (self preorderTraversal) do: [ :eachNode | + (eachNode level > 0) ifTrue: [(eachNode parent header = '%invisible') not ifTrue: [markdownOutput nextPutAll: (eachNode markdownContent)]]]. ^markdownOutput contents @@ -257,11 +259,11 @@ GrafoscopioNode >> markdownContent [ ifTrue: [ self level timesRepeat: [ markdown nextPutAll: '#' ]. markdown nextPutAll: ' '. - markdown nextPutAll: (self header copyReplaceTokens: #cr with: #lf); lf; lf. + markdown nextPutAll: (self header copyReplaceTokens: #cr with: #lf); crlf; crlf. embedNodes := self children select: [:each | ((each header findTokens: $ ) at: 1) = '%embed']. temporalBody := self body. embedNodes ifNotNil: [ embedNodes do: [ :each | temporalBody := temporalBody copyReplaceAll: (each header) with: each body]]. - markdown nextPutAll: (temporalBody contents withUnixLineEndings); lf; lf]. + markdown nextPutAll: (temporalBody contents withInternetLineEndings ); crlf; crlf]. (self header = '%config') ifTrue: [ @@ -288,7 +290,7 @@ GrafoscopioNode >> markdownContent [ ((self header findString: '%invisible') = 1) | (self header = '%invisible') ifTrue: [ invisibleChildren := self children. - invisibleChildren ifNotNil: [invisibleChildren do: [ ] ] ]. + invisibleChildren ifNotNil: [ ] ]. ^markdown contents ]