From b894b4b8018958791ca93f0b9a69dc2b946a1fca Mon Sep 17 00:00:00 2001 From: Diego Ruidajo Date: Wed, 26 Jan 2022 18:12:50 -0500 Subject: [PATCH] Debugging file serialization. --- repository/TiddlyWiki/Tiddler.class.st | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/repository/TiddlyWiki/Tiddler.class.st b/repository/TiddlyWiki/Tiddler.class.st index 45de085..99dc346 100644 --- a/repository/TiddlyWiki/Tiddler.class.st +++ b/repository/TiddlyWiki/Tiddler.class.st @@ -145,9 +145,11 @@ Tiddler >> exportJSONFile [ { #category : #accessing } Tiddler >> exportSTONFile [ - | stonFile output dashedTitle | + | stonFile output dashedTitle sanitized date | dashedTitle := '-' join: (self title substrings collect: [ :each | each ]). - stonFile := self wiki file parent / 'tiddlers' / (dashedTitle, '.', self created asString, '.ston'). + sanitized := dashedTitle copyWithoutAll: #($¿ $? $! $¡ $/). + date := self created hash hex copyFrom: 1 to: 5. + stonFile := self wiki file parent / 'tiddlers' / (sanitized, '--', date, '.ston'). ^ MarkupFile exportAsFileOn: stonFile containing: self asStonStringPretty ]