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

fmt: avoid space before newline #910

Merged
merged 1 commit into from
Jan 7, 2025
Merged

Conversation

mknos
Copy link
Contributor

@mknos mknos commented Jan 7, 2025

  • In fmt_line(), the @out list describes one line of text
  • Each word token keeps a record of trailing spaces after the word (i.e. "suffix" number in the code)
  • Trailing space should be ignored for the final word on the line because it gets terminated by a newline

* In fmt_line() out-list describes one line of text
* Each word keeps a record of trailing spaces after the word (i.e. "suffix" number in the code)
* Trailing space should be ignored for the final word on the line because it gets terminated by a newline
@github-actions github-actions bot added Type: enhancement improve a feature that already exists Priority: low get to this whenever Program: fmt The fat program labels Jan 7, 2025
@mknos mknos had a problem deploying to automated_testing January 7, 2025 01:44 — with GitHub Actions Failure
@mknos mknos had a problem deploying to automated_testing January 7, 2025 01:44 — with GitHub Actions Failure
@mknos mknos had a problem deploying to automated_testing January 7, 2025 01:44 — with GitHub Actions Failure
@mknos mknos had a problem deploying to automated_testing January 7, 2025 01:44 — with GitHub Actions Failure
@mknos mknos had a problem deploying to automated_testing January 7, 2025 01:44 — with GitHub Actions Failure
@briandfoy briandfoy self-assigned this Jan 7, 2025
@@ -147,6 +147,7 @@ sub fmt_line {
my $s = ' ' x $out[0]->{'indent'};
print $s;

$out[-1]->{'suffix'} = 0;
Copy link
Owner

Choose a reason for hiding this comment

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

these seems like it will work for now.

@briandfoy briandfoy merged commit 4068192 into briandfoy:master Jan 7, 2025
1 of 22 checks passed
@briandfoy briandfoy added Status: accepted The fix is accepted and removed Priority: low get to this whenever labels Jan 7, 2025
@briandfoy briandfoy added Type: bug an existing feature does not work and removed Type: enhancement improve a feature that already exists labels Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Program: fmt The fat program Status: accepted The fix is accepted Type: bug an existing feature does not work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants