-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'pillar-markup:dev' into webDeveloppemment
- Loading branch information
Showing
13 changed files
with
148 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/Microdown-BeamerExporter-Tests/MicMicrodownToSlideTest.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
Class { | ||
#name : 'MicMicrodownToSlideTest', | ||
#superclass : 'TestCase', | ||
#category : 'Microdown-BeamerExporter-Tests', | ||
#package : 'Microdown-BeamerExporter-Tests' | ||
} | ||
|
||
{ #category : 'tests' } | ||
MicMicrodownToSlideTest >> testSectionLevelOneIsMapToSlide [ | ||
|
||
| doc slide | | ||
doc := MicrodownParser new parse: '# Slide title | ||
- item 1 | ||
- item 2 | ||
'. | ||
MicMicrodownToSlideVisitor new visit: doc. | ||
slide := doc children first. | ||
self assert: slide class equals: MicSlideBlock. | ||
self assert: slide title equals: 'Slide title'. | ||
self assert: doc children second class equals: MicUnorderedListBlock. | ||
|
||
|
||
] | ||
|
||
{ #category : 'tests' } | ||
MicMicrodownToSlideTest >> testSlideGotCorrectParent [ | ||
|
||
| doc slide | | ||
doc := MicrodownParser new parse: '# Slide title | ||
- item 1 | ||
- item 2 | ||
'. | ||
self assert: doc children size equals: 2. | ||
MicMicrodownToSlideVisitor new visit: doc. | ||
slide := doc children first. | ||
self assert: slide parent equals: doc. | ||
self assert: doc children size equals: 2 | ||
|
||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Package { #name : #'Microdown-BeamerExporter-Tests' } | ||
Package { #name : 'Microdown-BeamerExporter-Tests' } |
13 changes: 13 additions & 0 deletions
13
src/Microdown-BeamerExporter/MicMicrodownToSlideVisitor.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Class { | ||
#name : 'MicMicrodownToSlideVisitor', | ||
#superclass : 'MicrodownVisitor', | ||
#category : 'Microdown-BeamerExporter', | ||
#package : 'Microdown-BeamerExporter' | ||
} | ||
|
||
{ #category : 'visiting' } | ||
MicMicrodownToSlideVisitor >> visitHeader: aHeader [ | ||
|
||
aHeader parent replace: aHeader by: (MicSlideBlock new title: aHeader header) | ||
|
||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters