Merge branch 'master' of https://code.sustrato.red/Offray/MiniDocs
This commit is contained in:
commit
cccf81e89b
@ -50,7 +50,7 @@ Markdown >> body: aString [
|
|||||||
{ #category : #operation }
|
{ #category : #operation }
|
||||||
Markdown >> commentYAMLMetadata [
|
Markdown >> commentYAMLMetadata [
|
||||||
| newContents |
|
| newContents |
|
||||||
self detectYAMLMetadata ifFalse: [ ^ self ].
|
self contents detectYAMLMetadata ifFalse: [ ^ self ].
|
||||||
newContents := '' writeStream.
|
newContents := '' writeStream.
|
||||||
newContents nextPutAll: '<!--@yaml'; lf.
|
newContents nextPutAll: '<!--@yaml'; lf.
|
||||||
newContents nextPutAll: self yamlMetadataString.
|
newContents nextPutAll: self yamlMetadataString.
|
||||||
@ -230,3 +230,8 @@ Markdown >> printOn: aStream [
|
|||||||
Markdown >> title [
|
Markdown >> title [
|
||||||
^ title ifNil: [ title:= self headerAsTitle ]
|
^ title ifNil: [ title:= self headerAsTitle ]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
Markdown >> title: aString [
|
||||||
|
title := aString
|
||||||
|
]
|
||||||
|
@ -147,17 +147,11 @@ Pandoc class >> markdownToHtmlOnUnix: inputFile [
|
|||||||
outputFile := inputFile parent / (inputFile basenameWithoutExtension , '.html').
|
outputFile := inputFile parent / (inputFile basenameWithoutExtension , '.html').
|
||||||
outputFile ensureDelete.
|
outputFile ensureDelete.
|
||||||
outputFile ensureCreateFile.
|
outputFile ensureCreateFile.
|
||||||
OSSUnixSubprocess new
|
GtSubprocessWithInMemoryOutput new
|
||||||
command: 'pandoc';
|
shellCommand: 'pandoc -f markdown+startnum+task_lists --standalone -t html ', inputFile fullName, ' --output ', outputFile fullName;
|
||||||
arguments: {'-f'. 'markdown+startnum+task_lists'. '--standalone'. '-t'. 'html'. inputFile fullName.
|
runAndWait;
|
||||||
'--output'. outputFile fullName };
|
stdout.
|
||||||
redirectStdout;
|
^ outputFile.
|
||||||
redirectStderr;
|
|
||||||
runAndWaitOnExitDo: [ :process :outString :errString |
|
|
||||||
process isSuccess
|
|
||||||
ifTrue: [ ^ outputFile ]
|
|
||||||
ifFalse: [ ^ inputFile ]
|
|
||||||
]
|
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #converters }
|
{ #category : #converters }
|
||||||
|
Loading…
Reference in New Issue
Block a user