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 #1181; nimble setup adds empty lines to config.nims #1193

Merged
merged 1 commit into from
Mar 14, 2024
Merged

Conversation

ringabout
Copy link
Member

fixes #1181

fileContent.delete(startIndex..endIndex + sectionEnd.len - 1)

fileContent.append(configFileContent)
fileContent = fileContent[0..<startIndex] & configFileContent[0 ..< ^1] & fileContent[endIndex + sectionEnd.len .. ^1]
Copy link
Member

Choose a reason for hiding this comment

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

Is configFileContent[0 ..< ^1] the same as configFileContent?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, the trailing newline is being stripped in the configFileContent, which is undesirable

@Araq Araq merged commit 45282c4 into master Mar 14, 2024
6 checks passed
@Araq Araq deleted the pr_setup branch March 14, 2024 12:15
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.

nimble setup adds empty lines to config.nims
2 participants