Starting support for PubPub image links extended syntax.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-10-25 06:49:55 -05:00
parent dc7a4b93d1
commit 53284f1983

View File

@ -5,16 +5,45 @@ Class {
'document',
'link',
'linkLabel',
'linkContent'
'linkContent',
'imageLinkLabel',
'imageLinkContent',
'alternativeImages',
'imageLink'
],
#category : #'MiniDocs-Model'
}
{ #category : #accessing }
PubPubGrammar >> alternativeImages [
^ self linkContent
]
{ #category : #accessing }
PubPubGrammar >> document [
^ link islandInSea star
]
{ #category : #links }
PubPubGrammar >> imageLink [
^ imageLinkLabel, imageLinkContent, alternativeImages
]
{ #category : #links }
PubPubGrammar >> imageLinkContent [
^ '(' asPParser, #any asPParser starLazy flatten, ')' asPParser ==> #second
]
{ #category : #links }
PubPubGrammar >> imageLinkLabel [
^ '![' asPParser, #any asPParser starLazy flatten, $] asPParser ==> #second
]
{ #category : #accessing }
PubPubGrammar >> imageLinkSea [
^ imageLink sea ==> #second
]
{ #category : #links }
PubPubGrammar >> link [
^ linkLabel, linkContent