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