Minimal detection of PubPub footnote links.
This commit is contained in:
parent
70a06b2c4d
commit
162d126aeb
@ -17,21 +17,17 @@ PubPubGrammar >> document [
|
|||||||
|
|
||||||
{ #category : #links }
|
{ #category : #links }
|
||||||
PubPubGrammar >> link [
|
PubPubGrammar >> link [
|
||||||
^ linkLabel, linkContent ==> #second
|
^ linkLabel, linkContent
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #links }
|
{ #category : #links }
|
||||||
PubPubGrammar >> linkContent [
|
PubPubGrammar >> linkContent [
|
||||||
| content |
|
^ '{' asPParser, #any asPParser starLazy flatten, '}' asPParser ==> #second.
|
||||||
content := ($} asPParser not) star flatten.
|
|
||||||
^ ${ asPParser, content, $} asPParser
|
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #links }
|
{ #category : #links }
|
||||||
PubPubGrammar >> linkLabel [
|
PubPubGrammar >> linkLabel [
|
||||||
| label |
|
^ $[ asPParser, #any asPParser starLazy flatten, $] asPParser ==> #second.
|
||||||
label := ($] asPParser not) star flatten.
|
|
||||||
^ $[ asPParser, label, $] asPParser
|
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
|
Loading…
Reference in New Issue
Block a user