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

fixes bug in printing of new Array with comment #911 #912

Merged
merged 1 commit into from
Oct 30, 2016

Conversation

pvojtechovsky
Copy link
Collaborator

In case of comment the last character is the last character of the
comment and not the ",".

@monperrus
Copy link
Collaborator

Hi Pavel,
Thanks for the contribution. Would you add a test case to avoid a regression in the future?
Thanks, --Martin

@pvojtechovsky
Copy link
Collaborator Author

Hi Martin,
The test was added and it comply with formatting rules now too.
Best regards,
Pavel

@monperrus
Copy link
Collaborator

now it breaks a test, could you make it pass? thanks.

@pvojtechovsky
Copy link
Collaborator Author

I modified the fix by way it keeps formatting of annotations too.
Now all seems to be ok. I just actually do not know how to squash all commits into one, without creating new branch and loosing this PR.... but I will hopefully found it soon...

In case of comment the last character is the last character of the
comment and not the " , ". So we have to call printer.removeLastChar();
before comment is added. 
It is not enough to skip adding " , ", because printer.removeLastChar();
removes EOL added by previous call of scan() too. It influences
formatting of spooned code
@monperrus monperrus merged commit b2951a7 into INRIA:master Oct 30, 2016
@monperrus
Copy link
Collaborator

excellent, thanks. We can squash at merge time.

@pvojtechovsky pvojtechovsky deleted the fix-newArray-printer branch October 30, 2016 15:36
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