diff --git a/repository/Grafoscopio-Utils/Pandoc.class.st b/repository/Grafoscopio-Utils/Pandoc.class.st index 5c91fc5..b97d436 100644 --- a/repository/Grafoscopio-Utils/Pandoc.class.st +++ b/repository/Grafoscopio-Utils/Pandoc.class.st @@ -114,6 +114,13 @@ Pandoc class >> luaFilters [ { #category : #converters } 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 := FileLocator temp / (inputFile basenameWithoutExtension , '.html'). outputFile ensureDelete. @@ -130,3 +137,10 @@ Pandoc class >> markdownToHtml: inputFile [ ifFalse: [ ^ inputFile ] ] ] + +{ #category : #converters } +Pandoc class >> markdownToHtmlOnWindows: inputFile [ + + + ^ LibC resultOfCommand: 'pandoc -f markdown+startnum+task_lists -t html inputFile fullName'. +]