Minimal detection of PubPub footnote links.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-10-21 21:05:40 -05:00
parent 70a06b2c4d
commit 162d126aeb

View File

@ -17,21 +17,17 @@ PubPubGrammar >> document [
{ #category : #links }
PubPubGrammar >> link [
^ linkLabel, linkContent ==> #second
^ linkLabel, linkContent
]
{ #category : #links }
PubPubGrammar >> linkContent [
| content |
content := ($} asPParser not) star flatten.
^ ${ asPParser, content, $} asPParser
^ '{' asPParser, #any asPParser starLazy flatten, '}' asPParser ==> #second.
]
{ #category : #links }
PubPubGrammar >> linkLabel [
| label |
label := ($] asPParser not) star flatten.
^ $[ asPParser, label, $] asPParser
^ $[ asPParser, #any asPParser starLazy flatten, $] asPParser ==> #second.
]
{ #category : #accessing }