From 13f9b8050eab103bbd169e0903336e90b9eed883 Mon Sep 17 00:00:00 2001 From: Offray Date: Sat, 13 Apr 2024 11:49:04 -0500 Subject: [PATCH] Fixing repeated medatada when exporting to Markdeep. --- src/MiniDocs/LePage.extension.st | 5 +++-- src/MiniDocs/Markdeep.class.st | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/MiniDocs/LePage.extension.st b/src/MiniDocs/LePage.extension.st index b0271ca..fa264ac 100644 --- a/src/MiniDocs/LePage.extension.st +++ b/src/MiniDocs/LePage.extension.st @@ -35,6 +35,7 @@ LePage >> asMarkdeep [ self metadata at: 'version' ifPresent: [ :version | markdeep metadata at: 'version' put: version ]. + markdeep head: nil. ^ markdeep ] @@ -180,7 +181,7 @@ LePage >> markdownFileName [ { #category : #'*MiniDocs' } LePage >> metadata [ - ^ self options at: 'metadata' ifAbsentPut: [ self metadataUpdate] + ^ self metadataUpdate ] { #category : #'*MiniDocs' } @@ -190,7 +191,7 @@ LePage >> metadataUpdate [ at: 'id' put: self uidString; at: 'title' put: self contentAsString; at: 'created' put: self createTime greaseString; - at: 'modified' put: self latestEditTime greaseString; + at: 'modified' put: self getLatestEditTime greaseString; at: 'creator' put: self createEmail greaseString; at: 'modifier' put: self editEmail greaseString; yourself diff --git a/src/MiniDocs/Markdeep.class.st b/src/MiniDocs/Markdeep.class.st index c9d4124..5232639 100644 --- a/src/MiniDocs/Markdeep.class.st +++ b/src/MiniDocs/Markdeep.class.st @@ -294,8 +294,11 @@ Markdeep >> headContents [ nextPutAll: line; nextPut: Character lf ]. - stream nextPutAll: - '', (STON toStringPretty: self metadata), ''. + self metadata keysAndValuesDo: [:k :v | + k = 'lang' + ifTrue: [ stream nextPutAll: ' '; cr. ] + ifFalse: [ stream nextPutAll: ' '; cr. ] + ]. stream nextPutAll: ''; nextPut: Character lf.