Before solving the problem with '%invisible' nodes.
This commit is contained in:
parent
941d2bb244
commit
eccc0ca914
@ -253,7 +253,7 @@ GrafoscopioNode >> markdownContent [
|
||||
| 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
|
||||
(self level > 0) & (specialWords includes: self header) not & (specialWords includes: ((self header findTokens: $ ) at: 1)) not
|
||||
ifTrue: [
|
||||
self level timesRepeat: [ markdown nextPutAll: '#' ].
|
||||
markdown nextPutAll: ' '.
|
||||
@ -273,18 +273,20 @@ GrafoscopioNode >> markdownContent [
|
||||
markdown nextPutAll: 'abstract: ', '|'; lf; nextPutAll: (configDict at: 'abstract'); lf.
|
||||
markdown nextPutAll: '---'; lf. ].
|
||||
((self header findString: '%idea') = 1)
|
||||
ifTrue: ["markdown nextPutAll: (self body contents withInternetLineEndings); lf; lf."
|
||||
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.
|
||||
ifTrue: [
|
||||
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.
|
||||
].
|
||||
((self header findString: '%footnote') = 1)
|
||||
ifTrue: [
|
||||
markdown nextPutAll: ('[^',(self header copyReplaceAll: '#footnote ' with: ''),']: ' ); lf.
|
||||
markdown nextPutAll: ('[^',(self header copyReplaceAll: '%footnote ' with: ''),']: ' ); lf.
|
||||
markdown nextPutAll: (self body contents withInternetLineEndings); lf; lf. ].
|
||||
((self header findString: '%embed') = 1)
|
||||
ifTrue: [ ].
|
||||
(self header = '%invisible')
|
||||
ifTrue: [ ].
|
||||
^markdown contents
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user