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 HTMLFormatter for textarea #2840

Merged

Conversation

APB9785
Copy link
Contributor

@APB9785 APB9785 commented Oct 3, 2023

Resolves #2838

HTMLFormatter is adding a newline between <textarea> tags, which adds unexpected whitespace to the rendered output. This can be reproduced by setting the line length on the following test:

assert_formatter_doesnt_change(
  """
  <textarea></textarea>
  """,
  line_length: 5
)

The culprit is a check for buffer != [] which fails the test when present but passes when the check is removed.

@josevalim josevalim merged commit da79d35 into phoenixframework:main Oct 3, 2023
4 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

@APB9785 APB9785 deleted the fix-formatter-for-textarea branch October 3, 2023 15: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.

Textareas being formatted by HTMLFormatter
2 participants