Skip to content

Commit

Permalink
Merge 9b86f05
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanlm committed Jul 23, 2020
2 parents ea4b5b0 + 9b86f05 commit 8406c86
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/BaselineOfSpecCore/BaselineOfSpecCore.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ BaselineOfSpecCore >> complishon: spec [
BaselineOfSpecCore >> pillar: spec [
spec
baseline: 'PillarCore'
with: [ spec repository: 'github://pillar-markup/pillar:v7.7.5/src' ]
with: [ spec repository: 'github://pillar-markup/pillar:dev-8/src' ]
]

{ #category : #acccessing }
Expand Down
6 changes: 6 additions & 0 deletions src/Spec2-Core/SpPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,12 @@ SpPresenter >> newNumberInput [
^ self instantiate: SpNumberInputFieldPresenter
]

{ #category : #widgets }
SpPresenter >> newPillarText [

^ self instantiate: SpPillarTextPresenter
]

{ #category : #widgets }
SpPresenter >> newPopover [

Expand Down
6 changes: 3 additions & 3 deletions src/Spec2-Core/SpRichTextPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ SpRichTextPresenter >> model [

{ #category : #'as yet unclassified' }
SpRichTextPresenter >> plaintext [
^ self textStyler writePlaintextString: self model
^ self textStyler value writePlaintextString: self model
]

{ #category : #rendering }
SpRichTextPresenter >> renderTree [

"^ SpRenderTreeBuilderVisitor new
^ SpRenderTreeBuilderVisitor new
styleProvider: self styleAttributes;
render: self model"
render: self model
]

{ #category : #initialization }
Expand Down
14 changes: 14 additions & 0 deletions src/Spec2-Pillar/SpPillarTextPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,24 @@
Class {
#name : #SpPillarTextPresenter,
#superclass : #SpRichTextPresenter,
#instVars : [
'formatString'
],
#category : #'Spec2-Pillar'
}

{ #category : #accessing }
SpPillarTextPresenter >> defaultTextStyler [
^ SpPillarTextStyler new
]

{ #category : #rendering }
SpPillarTextPresenter >> formatString [
^ formatString
]

{ #category : #rendering }
SpPillarTextPresenter >> formatString: aString [
super formatString: aString.
formatString := aString
]
5 changes: 4 additions & 1 deletion src/Spec2-Pillar/SpPillarTextStyler.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ Class {

{ #category : #parsing }
SpPillarTextStyler >> parseFormatString: aFormatString [
^ PRPillarParser parse: aFormatString
self class environment
at: #MicroDownParser
ifPresent: [ :cls | ^ (cls parse: aFormatString) asPillar ].
^ PRPillarParser parse: aFormatString
]

{ #category : #accessing }
Expand Down
12 changes: 12 additions & 0 deletions src/Spec2-Pillar/SpPillarTextWriter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ SpPillarTextWriter >> visitDocumentGroup: anObject [
^ group
]

{ #category : #'visiting-document' }
SpPillarTextWriter >> visitHeader: anObject [
super visitHeader: anObject.
self newline
]

{ #category : #'visiting-document' }
SpPillarTextWriter >> visitHorizontalRule: anObject [
stream
Expand Down Expand Up @@ -117,6 +123,12 @@ SpPillarTextWriter >> visitOrderedList: anObject [
self nest: 0 do: [ super visitOrderedList: anObject ]
]

{ #category : #'visiting-document' }
SpPillarTextWriter >> visitParagraph: anObject [
super visitDocumentGroup: anObject.
self newline
]

{ #category : #'visiting-document' }
SpPillarTextWriter >> visitPreformatted: anObject [
anObject children do: [ :each | self visit: each. self newline ]
Expand Down

0 comments on commit 8406c86

Please sign in to comment.