Improvement for errors when importing remote content.
This commit is contained in:
parent
c1c372ced8
commit
2a238ae2c2
@ -1,7 +1,7 @@
|
||||
Extension { #name : #LeDatabase }
|
||||
|
||||
{ #category : #'*MiniDocs' }
|
||||
LeDatabase >> addPageFromMarkdeep: markdeepDocTree [
|
||||
LeDatabase >> addPageFromMarkdeep: markdeepDocTree withRemote: externalDocLocation [
|
||||
|
||||
| remoteMetadata divSnippets snippets page |
|
||||
divSnippets := (markdeepDocTree xpath: '//div[@st-class]')
|
||||
@ -23,7 +23,7 @@ LeDatabase >> addPageFromMarkdeep: markdeepDocTree [
|
||||
createEmail: (LeEmail new email:(remoteMetadata at: 'creator'));
|
||||
editEmail: (LeEmail new email:(remoteMetadata at: 'modifier')).
|
||||
snippets do: [ :snippet | page addSnippet: snippet ].
|
||||
page children collect: [ :snippet |
|
||||
page children do: [ :snippet |
|
||||
(self hasBlockUID: (snippet uid))
|
||||
ifTrue: [ | existingPage |
|
||||
existingPage := self pages detect: [ :pageTemp | pageTemp includesSnippetUid: snippet uid ].
|
||||
@ -38,12 +38,13 @@ LeDatabase >> addPageFromMarkdeep: markdeepDocTree [
|
||||
|
||||
{ #category : #'*MiniDocs' }
|
||||
LeDatabase >> addPageFromMarkdeepUrl: aString [
|
||||
|
||||
| page |
|
||||
page := self detectLocalPageForRemote: aString.
|
||||
page ifNotNil: [ :arg | (self importErrorMessage: page).
|
||||
^ self ].
|
||||
^ self addPageFromMarkdeep: (self docTreeForLink: aString)
|
||||
page
|
||||
ifNotNil: [ :arg |
|
||||
self importErrorMessage: page.
|
||||
^ self ].
|
||||
^ self addPageFromMarkdeep: (self docTreeForLink: aString) withRemote: aString
|
||||
]
|
||||
|
||||
{ #category : #'*MiniDocs' }
|
||||
|
Loading…
Reference in New Issue
Block a user