Implementing readability of LePictureSnippets from Markdeep.
This commit is contained in:
parent
056dad228a
commit
eda63bfc3a
@ -256,7 +256,9 @@ LeDatabase >> sanitizeMarkdeepSnippets: divSnippets withMetadata: remoteMetadata
|
|||||||
snippetData := markdeepDiv asSnippetDictionary.
|
snippetData := markdeepDiv asSnippetDictionary.
|
||||||
creationTime := snippetData at: 'created'.
|
creationTime := snippetData at: 'created'.
|
||||||
modificationTime := snippetData at: 'modified'.
|
modificationTime := snippetData at: 'modified'.
|
||||||
timestampWarning := [:timestamp | 'Modified timestamps: ', timestamp ,' date and time was replaced instead of nil value. See "origin" metadata for more historical traceability information.'].
|
timestampWarning := [:timestamp |
|
||||||
|
'Modified timestamps: ', timestamp ,' date and time was replaced instead of nil value. See "origin" metadata for more historical traceability information.'
|
||||||
|
].
|
||||||
(creationTime = 'nil' and: [ modificationTime ~= 'nil' ])
|
(creationTime = 'nil' and: [ modificationTime ~= 'nil' ])
|
||||||
ifTrue: [
|
ifTrue: [
|
||||||
snippetData redefineTimestampsBefore: modificationTime.
|
snippetData redefineTimestampsBefore: modificationTime.
|
||||||
|
@ -18,7 +18,12 @@ OrderedDictionary >> asLepiterSnippet [
|
|||||||
ifTrue: [
|
ifTrue: [
|
||||||
response := LePharoSnippet new.
|
response := LePharoSnippet new.
|
||||||
response code: (self at: 'content')
|
response code: (self at: 'content')
|
||||||
].
|
].
|
||||||
|
(self at: 'className') = 'LePictureSnippet'
|
||||||
|
ifTrue: [
|
||||||
|
response := LePictureSnippet new.
|
||||||
|
"response code: (self at: 'content')"
|
||||||
|
].
|
||||||
response
|
response
|
||||||
uid: (LeUID new uidString: (self at: 'id'));
|
uid: (LeUID new uidString: (self at: 'id'));
|
||||||
parent: (self at: 'parent');
|
parent: (self at: 'parent');
|
||||||
|
@ -13,11 +13,12 @@ XMLElement >> asSnippetDictionary [
|
|||||||
XMLElement >> sanitizedContent [
|
XMLElement >> sanitizedContent [
|
||||||
| className sanitizedText |
|
| className sanitizedText |
|
||||||
className := self attributes at: 'st-class'.
|
className := self attributes at: 'st-class'.
|
||||||
(className = 'LeTextSnippet') ifTrue: [
|
((className = 'LeTextSnippet') or: [className = 'LePictureSnippet'])
|
||||||
sanitizedText := self contentString.
|
ifTrue: [
|
||||||
sanitizedText := sanitizedText allButFirst.
|
sanitizedText := self contentString.
|
||||||
sanitizedText := sanitizedText allButLast.
|
sanitizedText := sanitizedText allButFirst.
|
||||||
].
|
sanitizedText := sanitizedText allButLast.
|
||||||
|
].
|
||||||
(className = 'LePharoSnippet') ifTrue: [ | joinedText |
|
(className = 'LePharoSnippet') ifTrue: [ | joinedText |
|
||||||
sanitizedText := self contentString lines.
|
sanitizedText := self contentString lines.
|
||||||
sanitizedText := sanitizedText copyFrom: 4 to: sanitizedText size -2.
|
sanitizedText := sanitizedText copyFrom: 4 to: sanitizedText size -2.
|
||||||
|
Loading…
Reference in New Issue
Block a user