Improving Markdown to Markdeep conversion.
This commit is contained in:
parent
e3f3a62078
commit
f5006572e8
@ -132,7 +132,7 @@ LePage >> localHostAddress [
|
|||||||
MiniDocsServer teapot server isRunning ifFalse: [ MiniDocsServer restart ].
|
MiniDocsServer teapot server isRunning ifFalse: [ MiniDocsServer restart ].
|
||||||
route := MiniDocsServer teapot staticRouter prefix joinUsing: '/'.
|
route := MiniDocsServer teapot staticRouter prefix joinUsing: '/'.
|
||||||
localUrl := MiniDocsServer teapot server localUrl asString.
|
localUrl := MiniDocsServer teapot server localUrl asString.
|
||||||
^ {localUrl, route, '/', self markdeepFileName . MiniDocsServer}
|
^ localUrl, route, '/', self markdeepFileName
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'*MiniDocs' }
|
{ #category : #'*MiniDocs' }
|
||||||
|
@ -229,6 +229,7 @@ Markdown >> printOn: aStream [
|
|||||||
|
|
||||||
{ #category : #utilities }
|
{ #category : #utilities }
|
||||||
Markdown >> startsWithYAMLMetadataDelimiter [
|
Markdown >> startsWithYAMLMetadataDelimiter [
|
||||||
|
self lines ifEmpty: [^false].
|
||||||
^ self lines first beginsWith: self class yamlMetadataDelimiter
|
^ self lines first beginsWith: self class yamlMetadataDelimiter
|
||||||
|
|
||||||
]
|
]
|
||||||
@ -251,6 +252,7 @@ Markdown >> yamlMetadataClosingLineNumber [
|
|||||||
Markdown >> yamlMetadataString [
|
Markdown >> yamlMetadataString [
|
||||||
| output yamlLines |
|
| output yamlLines |
|
||||||
self detectYAMLMetadata ifFalse: [ ^nil ].
|
self detectYAMLMetadata ifFalse: [ ^nil ].
|
||||||
|
self lines ifEmpty: [ ^nil ].
|
||||||
yamlLines := self lines copyFrom: 2 to: self yamlMetadataClosingLineNumber - 1.
|
yamlLines := self lines copyFrom: 2 to: self yamlMetadataClosingLineNumber - 1.
|
||||||
output := '' writeStream.
|
output := '' writeStream.
|
||||||
yamlLines do: [ :line |
|
yamlLines do: [ :line |
|
||||||
|
@ -100,6 +100,7 @@ MiniDocs class >> shiftKeys [
|
|||||||
MiniDocs class >> yamlToJson: yamlString [
|
MiniDocs class >> yamlToJson: yamlString [
|
||||||
"This method uses a external binary written in Nim, as the native Pharo parser for YAML, written in PetitParser,
|
"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."
|
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 ].
|
self yamlToJsonBinary exists ifFalse: [ self installYamlToJson ].
|
||||||
|
|
||||||
OSSUnixSubprocess new
|
OSSUnixSubprocess new
|
||||||
|
Loading…
Reference in New Issue
Block a user