Support for detecting PubPub image links.
This commit is contained in:
parent
0d28f0c9f5
commit
381257e55c
@ -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"
|
||||
|
@ -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 }
|
||||
|
Loading…
Reference in New Issue
Block a user