diff --git a/repository/Grafoscopio/GrafoscopioBrowser.class.st b/repository/Grafoscopio/GrafoscopioBrowser.class.st index 4b66a17..040cbbe 100644 --- a/repository/Grafoscopio/GrafoscopioBrowser.class.st +++ b/repository/Grafoscopio/GrafoscopioBrowser.class.st @@ -229,7 +229,7 @@ GrafoscopioBrowser >> open [ self buildBrowser. mainTree := GrafoscopioNode new. mainTree becomeDefaultTree. - draftsLocation := FileSystem disk workingDirectory / 'Grafoscopio/Drafts'. + draftsLocation := FileSystem disk workingDirectory / 'Drafts'. draftsLocation ensureCreateDirectory. workingFile := draftsLocation / 'draft.ston'. browser openOn: mainTree children. diff --git a/repository/Grafoscopio/GrafoscopioNode.class.st b/repository/Grafoscopio/GrafoscopioNode.class.st index e0f3e99..765d98b 100644 --- a/repository/Grafoscopio/GrafoscopioNode.class.st +++ b/repository/Grafoscopio/GrafoscopioNode.class.st @@ -251,7 +251,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 | + | markdown configDict specialWords embedNodes temporalBody | 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 @@ -260,6 +260,8 @@ GrafoscopioNode >> markdownContent [ markdown nextPutAll: ' '. markdown nextPutAll: (self header copyReplaceTokens: #cr with: #lf); lf; lf. embedNodes := self headers select: [:each | ((each findTokens: $ ) at: 1) = '%embed']. + temporalBody := self body. + embedNodes ifNotNil: [ ]. markdown nextPutAll: (self body contents withUnixLineEndings); lf; lf]. (self header = '#config')