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.
|
||||
|
@ -19,6 +19,11 @@ OrderedDictionary >> asLepiterSnippet [
|
||||
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,7 +13,8 @@ XMLElement >> asSnippetDictionary [
|
||||
XMLElement >> sanitizedContent [
|
||||
| className sanitizedText |
|
||||
className := self attributes at: 'st-class'.
|
||||
(className = 'LeTextSnippet') ifTrue: [
|
||||
((className = 'LeTextSnippet') or: [className = 'LePictureSnippet'])
|
||||
ifTrue: [
|
||||
sanitizedText := self contentString.
|
||||
sanitizedText := sanitizedText allButFirst.
|
||||
sanitizedText := sanitizedText allButLast.
|
||||
|
Loading…
Reference in New Issue
Block a user