Changing default location for drafts temporally to solve a problem in the workshop. Needs to be reviewed and corrected.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2014-11-01 16:36:57 +00:00 committed by SantiagoBragagnolo
parent 3b3dcdacea
commit fd7e42ebc7
2 changed files with 4 additions and 2 deletions

View File

@ -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.

View File

@ -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')