Skip to content
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

Merged

Conversation

moufort
Copy link
Collaborator

@moufort moufort commented Aug 20, 2024

Issue #846
I change the !! syntax to >[!

ifNotNil: [ body = '' ifTrue: [ body := body , line ]
ifFalse: [ body := body , String cr , line ]]
| indexOfFirstClosingBracket |
indexOfFirstClosingBracket := line indexOf: $].
Copy link
Contributor

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 ]

Copy link
Collaborator Author

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 [
Copy link
Contributor

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' }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could categorize the method.

@Ducasse
Copy link
Contributor

Ducasse commented Aug 21, 2024

The following tests are not passing

✗ #testAnnotatedBlockTextElements (1ms)
 ✗ #testAnnotatedBlockWithListParserLogic (1ms)
 ✗ #testAnnotatedBlock (3ms)
 ✗ #testAnnotatedBlockOnMultipleLinesParserLogic (2ms)

@Ducasse Ducasse merged commit e6cfb92 into pillar-markup:dev Aug 21, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants