Refactoring class and methods hierarchies.
This commit is contained in:
parent
690ae86e2f
commit
4b75042fab
@ -22,6 +22,14 @@ HedgeDoc class >> newDefault [
|
||||
defaultServer.
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
HedgeDoc >> asMarkdeep [
|
||||
^ Markdeep new
|
||||
metadata: self metadata;
|
||||
body: self contents;
|
||||
file: self file, 'html'
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
HedgeDoc >> asMarkdownTiddler [
|
||||
self url ifNil: [ ^ self ].
|
||||
|
@ -140,14 +140,6 @@ Markdeep >> contents [
|
||||
^ output contents.
|
||||
]
|
||||
|
||||
{ #category : #persistence }
|
||||
Markdeep >> exportAsFile [
|
||||
| newFile |
|
||||
self markdownFile ifNil: [ self inform: 'Define an input Markdown file or use #exportAsFileOn: instead.' ].
|
||||
newFile := (self markdownFile fullName, '.html') asFileReference.
|
||||
^ self notifyExportAsFileOn: newFile.
|
||||
]
|
||||
|
||||
{ #category : #utilities }
|
||||
Markdeep >> fontAwesomeHeader [
|
||||
"I enable the font awesome support in the document header"
|
||||
@ -260,13 +252,6 @@ Markdeep >> navTop: aString [
|
||||
navTop:= aString.
|
||||
]
|
||||
|
||||
{ #category : #persistence }
|
||||
Markdeep >> notifyExportAsFileOn: aFileReference [
|
||||
self exportAsFileOn: aFileReference.
|
||||
self inform: 'Exported as: ', String cr, aFileReference fullName.
|
||||
^ aFileReference
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
Markdeep >> options [
|
||||
^ options ifNil: [
|
||||
|
@ -74,6 +74,14 @@ Markdown >> detectYAMLMetadata [
|
||||
ifFound: [ ^ true ] ifNone: [ ^ false ] ]
|
||||
]
|
||||
|
||||
{ #category : #persistence }
|
||||
Markdown >> exportAsFile [
|
||||
| newFile |
|
||||
self file ifNil: [ self inform: 'Define an input Markdown file or use #exportAsFileOn: instead.' ].
|
||||
newFile := (self file fullName ) asFileReference.
|
||||
^ self notifyExportAsFileOn: newFile.
|
||||
]
|
||||
|
||||
{ #category : #persistence }
|
||||
Markdown >> exportAsFileOn: aFileReference [
|
||||
aFileReference ensureDelete.
|
||||
@ -161,6 +169,13 @@ Markdown >> metadata: rawMeta [
|
||||
metadata := rawMeta
|
||||
]
|
||||
|
||||
{ #category : #persistence }
|
||||
Markdown >> notifyExportAsFileOn: aFileReference [
|
||||
self exportAsFileOn: aFileReference.
|
||||
self inform: 'Exported as: ', String cr, aFileReference fullName.
|
||||
^ aFileReference
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
Markdown >> populateMetadata [
|
||||
| rawMeta |
|
||||
|
Loading…
Reference in New Issue
Block a user