Improving Markdown to Markdeep conversion.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2023-07-03 21:55:57 -05:00
parent e3f3a62078
commit f5006572e8
3 changed files with 5 additions and 2 deletions

View File

@ -132,7 +132,7 @@ LePage >> localHostAddress [
MiniDocsServer teapot server isRunning ifFalse: [ MiniDocsServer restart ].
route := MiniDocsServer teapot staticRouter prefix joinUsing: '/'.
localUrl := MiniDocsServer teapot server localUrl asString.
^ {localUrl, route, '/', self markdeepFileName . MiniDocsServer}
^ localUrl, route, '/', self markdeepFileName
]
{ #category : #'*MiniDocs' }

View File

@ -229,6 +229,7 @@ Markdown >> printOn: aStream [
{ #category : #utilities }
Markdown >> startsWithYAMLMetadataDelimiter [
self lines ifEmpty: [^false].
^ self lines first beginsWith: self class yamlMetadataDelimiter
]
@ -251,6 +252,7 @@ Markdown >> yamlMetadataClosingLineNumber [
Markdown >> yamlMetadataString [
| output yamlLines |
self detectYAMLMetadata ifFalse: [ ^nil ].
self lines ifEmpty: [ ^nil ].
yamlLines := self lines copyFrom: 2 to: self yamlMetadataClosingLineNumber - 1.
output := '' writeStream.
yamlLines do: [ :line |

View File

@ -100,6 +100,7 @@ MiniDocs class >> shiftKeys [
MiniDocs class >> yamlToJson: yamlString [
"This method uses a external binary written in Nim, as the native Pharo parser for YAML, written in PetitParser,
was less robust and unable to parse correctly the same strings as the external one."
yamlString ifNil: [ ^ Dictionary new ].
self yamlToJsonBinary exists ifFalse: [ self installYamlToJson ].
OSSUnixSubprocess new