Fixing importing LePicture bug caused by new announcers behavior.
This commit is contained in:
parent
7bbf399ae1
commit
b4d6940ec6
@ -37,7 +37,7 @@ LeDatabase >> addPageCopy: aLePage [
|
||||
|
||||
{ #category : #'*MiniDocs' }
|
||||
LeDatabase >> addPageFromMarkdeep: markdeepDocTree withRemote: externalDocLocation [
|
||||
| remoteMetadata divSnippets dataSnippets snippets page |
|
||||
| remoteMetadata divSnippets dataSnippets page |
|
||||
divSnippets := (markdeepDocTree xpath: '//div[@st-class]') asOrderedCollection
|
||||
collect: [ :xmlElement | xmlElement postCopy ].
|
||||
remoteMetadata := Markdeep new metadataFromXML: markdeepDocTree.
|
||||
@ -52,11 +52,9 @@ LeDatabase >> addPageFromMarkdeep: markdeepDocTree withRemote: externalDocLocati
|
||||
dataSnippets := self sanitizeMarkdeepSnippets: divSnippets withMetadata: remoteMetadata.
|
||||
page := LePage new.
|
||||
page fromDictionary: remoteMetadata.
|
||||
snippets := dataSnippets collect: [ :each | each asLepiterSnippet ].
|
||||
snippets do: [ :snippet | "| currentParent |"
|
||||
dataSnippets do: [:each | | snippet|
|
||||
snippet := each asLepiterSnippet.
|
||||
page addSnippet: snippet.
|
||||
"currentParent := page detectParentSnippetWithUid: (snippet metadata at: 'parent').
|
||||
snippet parent: currentParent."
|
||||
].
|
||||
page children
|
||||
do: [ :snippet |
|
||||
|
@ -10,7 +10,7 @@ OrderedDictionary >> asLepiterSnippet [
|
||||
| response |
|
||||
self at: 'className' ifAbsent: [ ^ nil ].
|
||||
response := (self at: 'className') asClass new.
|
||||
response fromDictionary: self.
|
||||
[ response fromDictionary: self ] onErrorDo: [ ].
|
||||
[ response fromString: (self at: 'content') ] onErrorDo: [ ].
|
||||
self at: 'origin' ifPresent: [ response metadata at: 'origin' put: (self at: 'origin') ].
|
||||
self at: 'errata' ifPresent: [ response metadata at: 'errata' put: (self at: 'errata') ].
|
||||
|
Loading…
Reference in New Issue
Block a user