Improving HedgeDoc(s) convert/import as LePage(s).

This commit is contained in:
Offray Vladimir Luna Cárdenas 2024-03-26 14:52:18 -05:00
parent 4399531c8d
commit 72f3a633ae
2 changed files with 14 additions and 5 deletions

View File

@ -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

View File

@ -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 }