-
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 pull request #891 from pillar-markup/IntroducingInlineSpace
Introducing inline space
- Loading branch information
Showing
14 changed files
with
183 additions
and
13 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
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,31 @@ | ||
Class { | ||
#name : 'MicInlineSpaceBlockTest', | ||
#superclass : 'MicBlockTest', | ||
#category : 'Microdown-Tests-Parser', | ||
#package : 'Microdown-Tests', | ||
#tag : 'Parser' | ||
} | ||
|
||
{ #category : 'tests' } | ||
MicInlineSpaceBlockTest >> subjectClass [ | ||
^ MicInlineSpaceBlock | ||
] | ||
|
||
{ #category : 'tests' } | ||
MicInlineSpaceBlockTest >> testParagraphWithInlineSpace [ | ||
|
||
| root | | ||
root := self parser parse: 'a paragraph with an inline space here <br> it continues after here.'. | ||
self assert: root children size equals: 1. | ||
self assert: root children first children size equals: 3. | ||
self assert: root children first children second class equals: MicInlineSpaceBlock | ||
] | ||
|
||
{ #category : 'tests' } | ||
MicInlineSpaceBlockTest >> testParagraphWithInlineSpaceAndOthers [ | ||
|
||
| root | | ||
root := self parser parse: '_a paragraph_ with an *inline* space here <br> it continues after here.'. | ||
self assert: root children size equals: 1. | ||
self assert: root children first children size equals: 6 | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Class { | ||
#name : 'MicInlineSpaceBlock', | ||
#superclass : 'MicUnEvaluatedBlock', | ||
#category : 'Microdown-InlineParser', | ||
#package : 'Microdown', | ||
#tag : 'InlineParser' | ||
} | ||
|
||
{ #category : 'parsing' } | ||
MicInlineSpaceBlock class >> parse: delimiter stream: aTokenStream for: aParser [ | ||
|
||
^ self new | ||
] | ||
|
||
{ #category : 'visiting' } | ||
MicInlineSpaceBlock >> accept: aVisitor [ | ||
|
||
aVisitor visitInlineSpace: self | ||
] |
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,55 @@ | ||
Class { | ||
#name : 'MicInlineSpaceDelimiter', | ||
#superclass : 'MicInlineDelimiter', | ||
#pools : [ | ||
'MicSharedPool' | ||
], | ||
#category : 'Microdown-InlineParser', | ||
#package : 'Microdown', | ||
#tag : 'InlineParser' | ||
} | ||
|
||
{ #category : 'initialization' } | ||
MicInlineSpaceDelimiter class >> initializeDelimiters [ | ||
|
||
"line break" | ||
self new addMe | ||
|
||
|
||
|
||
] | ||
|
||
{ #category : 'accessing' } | ||
MicInlineSpaceDelimiter >> blockClass [ | ||
|
||
^ MicInlineSpaceBlock | ||
] | ||
|
||
{ #category : 'accessing' } | ||
MicInlineSpaceDelimiter >> isEvaluated [ | ||
|
||
^ false | ||
] | ||
|
||
{ #category : 'accessing' } | ||
MicInlineSpaceDelimiter >> isOpener [ | ||
|
||
^ true | ||
] | ||
|
||
{ #category : 'accessing' } | ||
MicInlineSpaceDelimiter >> isRawkind [ | ||
|
||
^ false | ||
] | ||
|
||
{ #category : 'accessing' } | ||
MicInlineSpaceDelimiter >> markup [ | ||
^ InlineSpace | ||
] | ||
|
||
{ #category : 'accessing' } | ||
MicInlineSpaceDelimiter >> markupAsRegex [ | ||
|
||
^ InlineSpace | ||
] |
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