Improving management of empty YAML metadata.
This commit is contained in:
parent
554fb9000e
commit
fb64d5c1ae
@ -159,7 +159,8 @@ Markdown >> fromFile: aFileReference [
|
||||
|
||||
{ #category : #'instance creation' }
|
||||
Markdown >> fromString: markdownString [
|
||||
(self metadata) at: 'original' put: markdownString yamlMetadata.
|
||||
markdownString yamlMetadata
|
||||
ifNotNil: [(self metadata) at: 'original' put: markdownString yamlMetadata].
|
||||
self body: markdownString contentsWithoutYAMLMetadata
|
||||
]
|
||||
|
||||
|
@ -118,6 +118,7 @@ String >> withoutXMLTagDelimiters [
|
||||
|
||||
{ #category : #'*MiniDocs' }
|
||||
String >> yamlMetadata [
|
||||
self yamlMetadataString ifNil: [^ nil ].
|
||||
^ (YAML2JSON fromString: self yamlMetadataString)
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user