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(rewrite): Handle formatting of json comments when adding new resourc... #58

Merged
merged 2 commits into from Feb 25, 2014

Conversation

js1972
Copy link
Collaborator

@js1972 js1972 commented Feb 24, 2014

...e roots

Add new method addCommaToLine(args) which allows you to find a line in a file
and add a terminating comment char at a specified offset from that line. Uses
same methods as in rewrite(args).
This solves the issue where new resource roots required a comma at the beginning of the line which did not look pretty.

Fixes #55 #57

This works great when using a clever editor like sublime, but if you're a poor sole that uses NotePad then there is still an issue with windows carriage returns in rewrite() that I don't have time to get to the bottom now... I think we should just leave it - and maybe even remove all concerns about windows carriage returns. i.e. ignore doing this: lines[otherwiseLineIndex] += "\r"; No harm in having it in there though.

…urce roots

Add new method addCommaToLine(args) which allows you to find a line in a file
 and add a terminating comment char at a specified offset from that line. Uses
 same methods as in rewrite(args).

Fixes saschakiefer#55 saschakiefer#57
saschakiefer added a commit that referenced this pull request Feb 25, 2014
fix(rewrite): Handle formatting of json comments when adding new resourc...
@saschakiefer saschakiefer merged commit 8d6a0b5 into saschakiefer:develop Feb 25, 2014
@js1972 js1972 deleted the format branch February 26, 2014 02: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.

None yet

2 participants