Skip to content

Fix multiLineWrap line-construction#100

Open
ferdnyc wants to merge 2 commits into
Imagick:masterfrom
ferdnyc:patch-1
Open

Fix multiLineWrap line-construction#100
ferdnyc wants to merge 2 commits into
Imagick:masterfrom
ferdnyc:patch-1

Conversation

@ferdnyc

@ferdnyc ferdnyc commented May 10, 2024

Copy link
Copy Markdown
  • 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

ferdnyc commented May 10, 2024

Copy link
Copy Markdown
Author

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