diff --git a/src/MiniDocs/Markdeep.class.st b/src/MiniDocs/Markdeep.class.st index 6d31c9e..02cc183 100644 --- a/src/MiniDocs/Markdeep.class.st +++ b/src/MiniDocs/Markdeep.class.st @@ -331,9 +331,7 @@ node-type= '. { #category : #accessing } Markdeep >> pubPubFootnoteRawLinks [ - | parser | - parser := PubPubGrammar new linkSea star. - ^ parser parse: self body + ^ self selectPubPubLinksWithSize: 2 ] { #category : #accessing } @@ -394,6 +392,18 @@ Markdeep >> pubPubFootnotesToMarkdeep [ self body: (sanitized copyReplaceAll: self pubPubFootnotesText with: cleanedFootnotesText contents) ] +{ #category : #accessing } +Markdeep >> pubPubImageLinks [ + ^ self selectPubPubLinksWithSize: 3 +] + +{ #category : #accessing } +Markdeep >> pubPubRawLinks [ + | parser | + parser := PubPubGrammar new document. + ^ (parser parse: self body) +] + { #category : #accessing } Markdeep >> replaceBackslashBreaklines [ self bodyReplaceAll: '\ @@ -401,6 +411,11 @@ Markdeep >> replaceBackslashBreaklines [ ' ] +{ #category : #accessing } +Markdeep >> selectPubPubLinksWithSize: naturalNumber [ + ^ self pubPubRawLinks select: [ :each | each size = naturalNumber ] +] + { #category : #accessing } Markdeep >> tail [ "I enable the document tail, which, in turn, enables a Markdeep document" diff --git a/src/MiniDocs/PubPubGrammar.class.st b/src/MiniDocs/PubPubGrammar.class.st index e46427f..7372c09 100644 --- a/src/MiniDocs/PubPubGrammar.class.st +++ b/src/MiniDocs/PubPubGrammar.class.st @@ -21,12 +21,7 @@ PubPubGrammar >> alternativeImages [ { #category : #accessing } PubPubGrammar >> document [ - ^ link islandInSea star -] - -{ #category : #accessing } -PubPubGrammar >> element [ - ^ (link / imageLink) star + ^ (link / imageLink ) islandInSea star ] { #category : #links }