Title is not part of metadata anymore (it should be only for Markdeep export).
This commit is contained in:
parent
27a20e83b0
commit
5aeac92772
@ -165,7 +165,7 @@ Markdown >> gtTextFor: aView [
|
||||
Markdown >> headerAsTitle [
|
||||
| headerNode |
|
||||
headerNode := self documentTree children
|
||||
detect: [ :node | node className = 'PPCMHeader' and: [ node level = 1 ] ] ifNone: [ ^ nil ].
|
||||
detect: [ :node | node className = 'PPCMHeader' and: [ node level = 1 ] ] ifNone: [ ^ 'Untitled' ].
|
||||
^ headerNode text
|
||||
]
|
||||
|
||||
@ -215,5 +215,5 @@ Markdown >> printOn: aStream [
|
||||
|
||||
{ #category : #accessing }
|
||||
Markdown >> title [
|
||||
^ self metadata at: 'title' ifAbsentPut: [ self headerAsTitle ]
|
||||
^ title ifNil: [ title:= self headerAsTitle ]
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user