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 printing of strings inside functions #4458

Merged
merged 1 commit into from
May 7, 2021

Conversation

ChrisJefferson
Copy link
Contributor

@ChrisJefferson ChrisJefferson commented May 4, 2021

Previously we normalised all whitespace in printed out functions, which would affect whitespace inside strings.

Previously we would print out functions, then to get rid of all whitespace using NormalizeWhitespace. However, this would also normalise whitespace inside strings.

@fingolfin
Copy link
Member

Why do we modify the whitespace at all?

@ChrisJefferson
Copy link
Contributor Author

Guessing, I assume it is because we want the String to be a single line, and concatenating the lines together would create huge spaces from indendantion.

Copy link
Member

@wilfwilson wilfwilson left a comment

Choose a reason for hiding this comment

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

Seems to do the job nicely, thanks, but I have a question and a suggestion.

lib/function.gi Outdated Show resolved Hide resolved
lib/function.gi Outdated Show resolved Hide resolved
@ChrisJefferson
Copy link
Contributor Author

There were several issues with this PR, but most of the code disappeared while fixing @fingolfin's comment (as removing formatting removed the indentation I needed to get rid of)

Previously we normalised all whitespace in printed out functions,
which would effect whitespace inside strings.
Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

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

Thanks

@fingolfin fingolfin merged commit 2141f4a into gap-system:master May 7, 2021
@fingolfin fingolfin added the release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes label Feb 25, 2022
@ChrisJefferson ChrisJefferson deleted the fix-string-in-func branch April 1, 2022 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants