diff --git a/repository/Grafoscopio/GrafoscopioNewNotebook.class.st b/repository/Grafoscopio/GrafoscopioNewNotebook.class.st index cf997f8..7316f96 100644 --- a/repository/Grafoscopio/GrafoscopioNewNotebook.class.st +++ b/repository/Grafoscopio/GrafoscopioNewNotebook.class.st @@ -362,20 +362,22 @@ GrafoscopioNewNotebook >> exportLinkContent [ { #category : #persistence } GrafoscopioNewNotebook >> exportNode: aGrafoscopioNode asMarkdownIn: aFile [ "I export the current tree/document to a markdown file" + aFile ensureDelete. - aFile + aFile ensureCreateFile; - writeStreamDo: [:stream | - stream - nextPutAll: - ('---', String cr, - 'exportedFrom: ', self checksumForRootSubtree, String cr) withInternetLineEndings. + writeStreamDo: [ :stream | + stream + nextPutAll: + ('---' , String cr , 'exportedFrom: ' , self checksumForRootSubtree + , String cr) withInternetLineEndings. aGrafoscopioNode metadataAsYamlIn: stream. - stream - nextPutAll: - ('---', String cr, String cr) withInternetLineEndings, - aGrafoscopioNode asMarkdown ]. - self inform: 'Exported as: ', String cr, aFile fullName + stream + nextPutAll: + ('---' , String cr , String cr) withInternetLineEndings + , aGrafoscopioNode asMarkdown. + stream flush ]. + self inform: 'Exported as: ' , String cr , aFile fullName ] { #category : #persistence } @@ -513,8 +515,8 @@ GrafoscopioNewNotebook >> initializePresenter [ item := tree selectedItem. tree selectedItem header: arg. tree selectedItem updateEditionTimestamp. - tree roots: tree roots. - tree selectItem: item ] ]. +" tree roots: tree roots." +" tree selectItem: item "] ]. links whenTextChangedDo: [ :arg | (tree respondsTo: #link:) @@ -1036,6 +1038,7 @@ GrafoscopioNewNotebook >> selectedItem: aGrafoscopioTextNode path: aPath [ { #category : #'asdas yet unclassified' } GrafoscopioNewNotebook >> selectedPathNextTo: aPath [ + aPath isEmpty ifTrue: [ ^ self ]. aPath at: aPath size put: (aPath at: aPath size) + 1. diff --git a/repository/Grafoscopio/GrafoscopioTextNode.class.st b/repository/Grafoscopio/GrafoscopioTextNode.class.st index bc6fbf9..17b28f6 100644 --- a/repository/Grafoscopio/GrafoscopioTextNode.class.st +++ b/repository/Grafoscopio/GrafoscopioTextNode.class.st @@ -649,7 +649,7 @@ GrafoscopioTextNode >> markdownContent [ GrafoscopioTextNode >> metadata [ | mnode | mnode := self root preorderTraversal - detect: [ :n | n headerStartsWith: '%metadata' ] + detect: [ :n | n header beginsWith: '%metadata' ] ifNone: [ ^ nil ]. ^ mnode output.