diff --git a/repository/Brea/BreaPage.class.st b/repository/Brea/BreaPage.class.st index afb2bd3..c0649b1 100644 --- a/repository/Brea/BreaPage.class.st +++ b/repository/Brea/BreaPage.class.st @@ -24,14 +24,17 @@ Class { { #category : #operation } BreaPage >> bodyContentsAsHTML [ - | sourcePage | + | sourcePage commandParameters | self contentsFile ifNil: [ ^ self ]. + sourcePage := self file file. Smalltalk os isWindows ifTrue: [ - ^ Pandoc markdownToHtml: self file file + ^ Pandoc markdownToHtml: sourcePage ]. - sourcePage := FileLocator temp / 'wikiPage.md'. - MarkupFile exportAsFileOn: sourcePage containing: self contents. - ^ Pandoc markdownToHtml: sourcePage + commandParameters := ' -f markdown+startnum+task_lists -t html '. + ^ GtSubprocessWithInMemoryOutput new + shellCommand: 'pandoc', commandParameters, sourcePage fullName; + runAndWait; + stdout. ] { #category : #accessing } @@ -63,7 +66,7 @@ BreaPage >> contents [ result nextPutAll: (Markdown fromFile: markdownTempFile) contents. ] ]. - ^ result contents. + ^ result contents withInternetLineEndings. ] { #category : #operation }