-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 846 better syntax for annotated paragraph #865
Issue 846 better syntax for annotated paragraph #865
Conversation
ifNotNil: [ body = '' ifTrue: [ body := body , line ] | ||
ifFalse: [ body := body , String cr , line ]] | ||
| indexOfFirstClosingBracket | | ||
indexOfFirstClosingBracket := line indexOf: $]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder what is the impact if the line does not contain ]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After getting the index of the first ], I test if he egal to 0.
If true, I removed the AnnotatedParagraphe to MicRootBlock, and I replace by a MicBlockQuoteBlock
indexOfFirstClosingBracket = 0
ifTrue: [ parent children removeLast. ^ self createMicBlockQuoteBlock: line ]
@@ -25,12 +26,39 @@ MicAnnotatedParagraphTest >> testBasicAnnotetedParagraph [ | |||
equals: 'This is an important information' | |||
] | |||
|
|||
{ #category : 'tests' } | |||
MicAnnotatedParagraphTest >> testBasicAnnotetedParagraphIgnoreExtraTextInFirstLine [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super nice test :)
@@ -41,6 +45,22 @@ MicAbstractAnnotatedBlock >> canConsumeLine: line [ | |||
^ line isNotEmpty | |||
] | |||
|
|||
{ #category : 'as yet unclassified' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could categorize the method.
The following tests are not passing
|
Issue #846
I change the !! syntax to >[!