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 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
|
||||||
ifTrue: [
|
ifTrue: [
|
||||||
self level timesRepeat: [ markdown nextPutAll: '#' ].
|
self level timesRepeat: [ markdown nextPutAll: '#' ].
|
||||||
markdown nextPutAll: ' '.
|
markdown nextPutAll: ' '.
|
||||||
@ -273,18 +273,20 @@ GrafoscopioNode >> markdownContent [
|
|||||||
markdown nextPutAll: 'abstract: ', '|'; lf; nextPutAll: (configDict at: 'abstract'); lf.
|
markdown nextPutAll: 'abstract: ', '|'; lf; nextPutAll: (configDict at: 'abstract'); lf.
|
||||||
markdown nextPutAll: '---'; lf. ].
|
markdown nextPutAll: '---'; lf. ].
|
||||||
((self header findString: '%idea') = 1)
|
((self header findString: '%idea') = 1)
|
||||||
ifTrue: ["markdown nextPutAll: (self body contents withInternetLineEndings); lf; lf."
|
ifTrue: [
|
||||||
embedNodes := self children select: [:each | ((each header findTokens: $ ) at: 1) = '%embed'].
|
embedNodes := self children select: [:each | ((each header findTokens: $ ) at: 1) = '%embed'].
|
||||||
temporalBody := self body.
|
temporalBody := self body.
|
||||||
embedNodes ifNotNil: [ embedNodes do: [ :each | temporalBody := temporalBody copyReplaceAll: (each header) with: each body]].
|
embedNodes ifNotNil: [ embedNodes do: [ :each | temporalBody := temporalBody copyReplaceAll: (each header) with: each body]].
|
||||||
markdown nextPutAll: (temporalBody contents withUnixLineEndings); lf; lf.
|
markdown nextPutAll: (temporalBody contents withUnixLineEndings); lf; lf.
|
||||||
].
|
].
|
||||||
((self header findString: '%footnote') = 1)
|
((self header findString: '%footnote') = 1)
|
||||||
ifTrue: [
|
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. ].
|
markdown nextPutAll: (self body contents withInternetLineEndings); lf; lf. ].
|
||||||
((self header findString: '%embed') = 1)
|
((self header findString: '%embed') = 1)
|
||||||
ifTrue: [ ].
|
ifTrue: [ ].
|
||||||
|
(self header = '%invisible')
|
||||||
|
ifTrue: [ ].
|
||||||
^markdown contents
|
^markdown contents
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user