Skip to content

Conversation

ferdnyc
Copy link

@ferdnyc ferdnyc commented May 10, 2024

  • Test the length of $possibleLine for overflow, not the length of $currentLine.
  • If $possibleLine doesn't overflow, it becomes the new $currentLine.
  • Only insert a space before the next $word when appending to a non-empty line.

Also, array_reverse() the final output, to avoid displaying the lines in backwards order.

ferdnyc added 2 commits May 10, 2024 16:45
Test the length of `$possibleLine` for overflow,
not the length of `$currentLine`.
Only insert a space before the next `$word`
when appending to a non-empty line.
@ferdnyc
Copy link
Author

ferdnyc commented May 10, 2024

Before (phpimagick.com site)

image

After (running locally with change)

image

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.

1 participant