diff --git a/src/MiniDocs/Markdown.class.st b/src/MiniDocs/Markdown.class.st index e9124ca..67cc94c 100644 --- a/src/MiniDocs/Markdown.class.st +++ b/src/MiniDocs/Markdown.class.st @@ -110,6 +110,11 @@ Markdown >> fromFile: aFileReference [ self file: aFileReference. ] +{ #category : #'instance creation' } +Markdown >> fromString: markdownString [ + self contents: markdownString. +] + { #category : #accessing } Markdown >> gtTextFor: aView [ @@ -126,7 +131,7 @@ Markdown >> lines [ { #category : #accessing } Markdown >> metadata [ | rawMeta | - rawMeta := PPYAMLGrammar new parse: self yamlMetadataString. + rawMeta := MiniDocs yamlToJson: self yamlMetadataString. rawMeta associationsDo: [ :assoc | assoc value = 'false' ifTrue: [ assoc value: false ]. assoc value = 'true' ifTrue: [ assoc value: true ] ]. @@ -137,7 +142,7 @@ Markdown >> metadata [ Markdown >> printOn: aStream [ super printOn: aStream. aStream - nextPutAll: '( ', (self metadata at: 'title'), ' )' + nextPutAll: '( ', (self metadata at: 'title' ifAbsent: ['untitled']), ' )' ] { #category : #utilities }