Improving HedgeDoc(s) convert/import as LePage(s).
This commit is contained in:
parent
4399531c8d
commit
72f3a633ae
@ -27,6 +27,18 @@ HedgeDoc class >> newDefault [
|
||||
defaultServer.
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
HedgeDoc >> asLePage [
|
||||
| newPage snippet |
|
||||
snippet := LeTextSnippet new
|
||||
string: self body.
|
||||
newPage := LePage new
|
||||
initializeTitle: self title;
|
||||
addSnippet: snippet;
|
||||
yourself.
|
||||
^ newPage
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
HedgeDoc >> asMarkdeep [
|
||||
^ Markdeep new
|
||||
|
@ -55,12 +55,9 @@ LeMiniDocsImport >> database: aLeDatabase [
|
||||
|
||||
{ #category : #accessing }
|
||||
LeMiniDocsImport >> importHedgedoc: aURL [
|
||||
| doc text page |
|
||||
| doc |
|
||||
doc := HedgeDoc fromLink: aURL asString.
|
||||
text := doc retrieveContents; contents.
|
||||
page := LePage named: (doc title).
|
||||
page addSnippet: (LeTextSnippet string: text).
|
||||
^ database addPage: page
|
||||
^ database addPage: doc asLePage
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
|
Loading…
Reference in New Issue
Block a user