Title is not part of metadata anymore (it should be only for Markdeep export).

This commit is contained in:
Offray Vladimir Luna Cárdenas 2024-03-25 18:29:19 -05:00
parent 27a20e83b0
commit 5aeac92772

View File

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