Starting multiplatform support for Pandoc.
This commit is contained in:
parent
ef93ecca8c
commit
5bb4c29bac
@ -114,6 +114,13 @@ Pandoc class >> luaFilters [
|
|||||||
{ #category : #converters }
|
{ #category : #converters }
|
||||||
Pandoc class >> markdownToHtml: inputFile [
|
Pandoc class >> markdownToHtml: inputFile [
|
||||||
|
|
||||||
|
(Smalltalk os isUnix or: [ Smalltalk os isMacOS ]) ifTrue: [ self markdownToHtmlOnUnix: inputFile ].
|
||||||
|
Smalltalk os isWindows ifTrue: [ self markdownToHtmlOnWindows: inputFile ].
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #converters }
|
||||||
|
Pandoc class >> markdownToHtmlOnUnix: inputFile [
|
||||||
|
|
||||||
| outputFile |
|
| outputFile |
|
||||||
outputFile := FileLocator temp / (inputFile basenameWithoutExtension , '.html').
|
outputFile := FileLocator temp / (inputFile basenameWithoutExtension , '.html').
|
||||||
outputFile ensureDelete.
|
outputFile ensureDelete.
|
||||||
@ -130,3 +137,10 @@ Pandoc class >> markdownToHtml: inputFile [
|
|||||||
ifFalse: [ ^ inputFile ]
|
ifFalse: [ ^ inputFile ]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #converters }
|
||||||
|
Pandoc class >> markdownToHtmlOnWindows: inputFile [
|
||||||
|
|
||||||
|
|
||||||
|
^ LibC resultOfCommand: 'pandoc -f markdown+startnum+task_lists -t html inputFile fullName'.
|
||||||
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user