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

Fix refactoring AddMethodComment #15622

Merged

Conversation

badetitou
Copy link
Member

@badetitou badetitou commented Nov 29, 2023

When looking to RBAddMethodCommentTransformation I discover that it uses surroundedBy: '"' instead of asComment to convert the string to a SmallTalk comment.

So, I first made the modification.
But I discovered that in some cases the first " is not duplicated, and the last is so

"ABC ABC" becomes: "ABC ABC"""

I saw that in asComment there is a special handling of the first ". So I decided to do the same for the last ".
I added a test for the refactoring and I extended the test case of asComment with the edging cases I discovered

Sorry for the number of edits in asComment that appear because of code formatting...

Copy link
Member

@jecisc jecisc left a comment

Choose a reason for hiding this comment

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

Nice!

@jecisc jecisc merged commit 0aae6d2 into pharo-project:Pharo12 Nov 29, 2023
1 of 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.

None yet

2 participants