Skip to content

Commit

Permalink
adding parameters: to environment and caption to math env
Browse files Browse the repository at this point in the history
  • Loading branch information
Ducasse committed May 18, 2021
1 parent 6630d0d commit e02c3a6
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Pillar-Core/PREndEnvironmentAnnotation.class.st
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
"
I'm the beginning of annotation to represent an environment (as in LaTeX): typically ${end:card}$
I'm theannotation to represent the end of an environment (as in LaTeX): typically `${end:card}$`
in the following example.
Here is for example an environment called card.
It is composed of a begin and end environment annotations.
```
${begin:card}$
!! I'm Cool
## I'm Cool
A paragraph about the card.
I will be interpreted as part of the card.
${end:card}$
```
See comment of PREnvironment.
See comment of `PREnvironment`.
"
Class {
#name : #PREndEnvironmentAnnotation,
Expand Down
5 changes: 5 additions & 0 deletions src/Pillar-Core/PREnvironment.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ PREnvironment >> parameters [
^ parameters
]

{ #category : #'accessing-parameters' }
PREnvironment >> parameters: anOrderedDictionary [
parameters := anOrderedDictionary
]

{ #category : #visiting }
PREnvironment >> printOn: aStream [

Expand Down
5 changes: 5 additions & 0 deletions src/Pillar-Core/PRMathEnvironment.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ PRMathEnvironment >> accept: aVisitor [
^ aVisitor visitMathEnvironment: self
]

{ #category : #visiting }
PRMathEnvironment >> caption [
^ self parameters at: 'caption'
]

{ #category : #'accessing-parameters' }
PRMathEnvironment >> text [
^ self children first text
Expand Down
5 changes: 5 additions & 0 deletions src/Pillar-Core/PRTParametrizable.trait.st
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ PRTParametrizable >> hasParameters [
^ self parameters isNotEmpty
]

{ #category : #'accessing-parameters' }
PRTParametrizable >> parameterAt: aKey [
^ self parameters at: aKey
]

{ #category : #'accessing-parameters' }
PRTParametrizable >> parameterAt: aKey put: aValue [
^ self parameters at: aKey put: aValue
Expand Down

0 comments on commit e02c3a6

Please sign in to comment.