diff --git a/src/MiniDocs/LeDatabase.extension.st b/src/MiniDocs/LeDatabase.extension.st index 2b84900..3d339f6 100644 --- a/src/MiniDocs/LeDatabase.extension.st +++ b/src/MiniDocs/LeDatabase.extension.st @@ -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' }