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
parent 234ec47f06
commit c8afd87f54
2 changed files with 4 additions and 2 deletions

View File

@ -229,7 +229,7 @@ GrafoscopioBrowser >> open [
self buildBrowser. self buildBrowser.
mainTree := GrafoscopioNode new. mainTree := GrafoscopioNode new.
mainTree becomeDefaultTree. mainTree becomeDefaultTree.
draftsLocation := FileSystem disk workingDirectory / 'Grafoscopio/Drafts'. draftsLocation := FileSystem disk workingDirectory / 'Drafts'.
draftsLocation ensureCreateDirectory. draftsLocation ensureCreateDirectory.
workingFile := draftsLocation / 'draft.ston'. workingFile := draftsLocation / 'draft.ston'.
browser openOn: mainTree children. browser openOn: mainTree children.

View File

@ -251,7 +251,7 @@ GrafoscopioNode >> level: anInteger [
GrafoscopioNode >> markdownContent [ GrafoscopioNode >> markdownContent [
"Extracts the markdown of a node using body as content, header as title and level as hierarchical level of the title. "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" 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. markdown := '' writeStream.
specialWords := #('#config' '#abstract' '#invisible' '#idea' '#footnote' 'nuevoNodo' '%embed'). specialWords := #('#config' '#abstract' '#invisible' '#idea' '#footnote' 'nuevoNodo' '%embed').
(self level > 0) & (specialWords includes: self header) not & (specialWords includes: ((self header findTokens: $ ) at: 1)) not (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: ' '.
markdown nextPutAll: (self header copyReplaceTokens: #cr with: #lf); lf; lf. markdown nextPutAll: (self header copyReplaceTokens: #cr with: #lf); lf; lf.
embedNodes := self headers select: [:each | ((each findTokens: $ ) at: 1) = '%embed']. embedNodes := self headers select: [:each | ((each findTokens: $ ) at: 1) = '%embed'].
temporalBody := self body.
embedNodes ifNotNil: [ ].
markdown nextPutAll: (self body contents withUnixLineEndings); lf; lf]. markdown nextPutAll: (self body contents withUnixLineEndings); lf; lf].
(self header = '#config') (self header = '#config')