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

Teddy should remove whitespace created when indenting/formatting Teddy tags #357

Closed
alallier opened this issue Jul 15, 2019 · 2 comments
Closed

Comments

@alallier
Copy link
Member

alallier commented Jul 15, 2019

This can create unexpected whitespace when you do something like this for example

<textarea>
  <if something>
    Some text here
  </if>
</textarea>

This will render a text area with 4 spaces and then the Some text here because it renders the spaces due to the if statement in this case.

@kethinov kethinov added the bug label Jul 15, 2019
@kethinov
Copy link
Member

I think the solution here is to trim the beginning and end of the string with respect to the parent element.

@kethinov
Copy link
Member

It may not be posible to fix this elegantly because it would require automatically trimming whitespace before and after the text within the <textarea> which could lead to lots of hacky consequences. Teddy 0.4.x did some of this and wasn't a great road to go down. Might be better to have people just do stuff like <textarea>{content}</textarea> where {content} is defined by the backend before it gets to the template.

kethinov added a commit to kethinov/teddy that referenced this issue Sep 26, 2020
closes rooseveltframework#412

closes many unreported bugs

wrote a test for rooseveltframework#404

wrote a test for rooseveltframework#357 but upon further investigate now consider it a wontfix
kethinov added a commit to kethinov/teddy that referenced this issue Sep 26, 2020
- Closed rooseveltframework#412
- Closed rooseveltframework#418
- Closed many unreported bugs.
- Wrote a test for rooseveltframework#404
- Wrote a test for rooseveltframework#357 but upon further investigation now consider it a wontfix.
- Various dependencies bumped.
kethinov added a commit that referenced this issue Sep 26, 2020
- Closed #412
- Closed #418
- Closed many unreported bugs.
- Wrote a test for #404
- Wrote a test for #357 but upon further investigation now consider it a wontfix.
- Various dependencies bumped.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants