From 77404b9b31942ee770a53d432f7a481cf5012667 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Thu, 27 Oct 2022 07:15:02 -0500 Subject: [PATCH] Converting PubPub image links to Markdeep and cleaning debugging code. --- src/MiniDocs/Markdeep.class.st | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/MiniDocs/Markdeep.class.st b/src/MiniDocs/Markdeep.class.st index 02cc183..09cb1cd 100644 --- a/src/MiniDocs/Markdeep.class.st +++ b/src/MiniDocs/Markdeep.class.st @@ -384,11 +384,6 @@ Markdeep >> pubPubFootnotesToMarkdeep [ nextPutAll: '[^', k, ']: '; nextPutAll: (v at: 'data-value'), String lf, String lf. ]. - "^ { 'links' -> parsedLinks . - 'footnotes' -> footnotes . - 'sanitized' -> sanitized . - 'footnotesRaw' -> self pubPubFootnotesText . - 'footnotesNew' -> cleanedFootnotesText contents } asDictionary." self body: (sanitized copyReplaceAll: self pubPubFootnotesText with: cleanedFootnotesText contents) ] @@ -397,6 +392,19 @@ Markdeep >> pubPubImageLinks [ ^ self selectPubPubLinksWithSize: 3 ] +{ #category : #accessing } +Markdeep >> pubPubImagesToMarkdeep [ + | sanitized parsedLinks | + + parsedLinks := self pubPubImageLinks. + parsedLinks ifEmpty: [ ^self ]. + sanitized := self body. + parsedLinks do: [:link | + sanitized := sanitized copyReplaceAll: '{', link third, '}' with: '' + ]. + self body: sanitized +] + { #category : #accessing } Markdeep >> pubPubRawLinks [ | parser |