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.
|
||||
creationTime := snippetData at: 'created'.
|
||||
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' ])
|
||||
ifTrue: [
|
||||
snippetData redefineTimestampsBefore: modificationTime.
|
||||
|
@ -18,7 +18,12 @@ OrderedDictionary >> asLepiterSnippet [
|
||||
ifTrue: [
|
||||
response := LePharoSnippet new.
|
||||
response code: (self at: 'content')
|
||||
].
|
||||
].
|
||||
(self at: 'className') = 'LePictureSnippet'
|
||||
ifTrue: [
|
||||
response := LePictureSnippet new.
|
||||
"response code: (self at: 'content')"
|
||||
].
|
||||
response
|
||||
uid: (LeUID new uidString: (self at: 'id'));
|
||||
parent: (self at: 'parent');
|
||||
|
@ -13,11 +13,12 @@ XMLElement >> asSnippetDictionary [
|
||||
XMLElement >> sanitizedContent [
|
||||
| className sanitizedText |
|
||||
className := self attributes at: 'st-class'.
|
||||
(className = 'LeTextSnippet') ifTrue: [
|
||||
sanitizedText := self contentString.
|
||||
sanitizedText := sanitizedText allButFirst.
|
||||
sanitizedText := sanitizedText allButLast.
|
||||
].
|
||||
((className = 'LeTextSnippet') or: [className = 'LePictureSnippet'])
|
||||
ifTrue: [
|
||||
sanitizedText := self contentString.
|
||||
sanitizedText := sanitizedText allButFirst.
|
||||
sanitizedText := sanitizedText allButLast.
|
||||
].
|
||||
(className = 'LePharoSnippet') ifTrue: [ | joinedText |
|
||||
sanitizedText := self contentString lines.
|
||||
sanitizedText := sanitizedText copyFrom: 4 to: sanitizedText size -2.
|
||||
|
Loading…
Reference in New Issue
Block a user