Improving Windows support. #2

Merged
Offray merged 2 commits from Windows into master 2020-12-18 18:54:40 +00:00
13 changed files with 1110 additions and 1100 deletions

View File

@ -43,6 +43,13 @@ BreaFile >> contents [
(self name endsWith: '.json') ifTrue: [ ^ NeoJSONObject fromString: file contents ]
]
{ #category : #accessing }
BreaFile >> file [
self folder ifNil: [ ^ self ].
self name ifNil: [ ^ self ].
^ self folder / self name.
]
{ #category : #accessing }
BreaFile >> folder [
^ folder

View File

@ -26,6 +26,9 @@ Class {
BreaPage >> bodyContentsAsHTML [
| sourcePage |
self contentsFile ifNil: [ ^ self ].
Smalltalk os isWindows ifTrue: [
^ Pandoc markdownToHtml: self file file
].
sourcePage := FileLocator temp / 'wikiPage.md'.
MarkupFile exportAsFileOn: sourcePage containing: self contents.
^ Pandoc markdownToHtml: sourcePage

View File

@ -144,7 +144,7 @@ BreaTheme >> folder: anObject [
BreaTheme >> installInto: aFolder [
| zippedFile |
self url ifNil: [ ^ self ].
zippedFile := self downloadInto: aFolder.
zippedFile := self downloadInto: FileLocator temp.
(ZipArchive new readFrom: zippedFile) extractAllTo: aFolder.
^ aFolder
]