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

Let templates have plaintext as contents (fixes 2702) #2708

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

kubeden
Copy link
Contributor

@kubeden kubeden commented Jul 11, 2024

Description

Please describe what changes you made, and why you feel they are necessary. Make sure to include
code examples, where applicable.

I introduced an additional check template.content.textContent.trim() === '' to make sure templates are not removed if they have plaintext inside.

Corresponding issue:
#2702

Testing

Please explain how you tested this change manually, and, if applicable, what new tests you added. If
you're making a change to just the website, you can omit this section.

I ran the sample server.py code provided by the person opening the PR. I then changed the source to htmx to my localhost htmx src. I added the additional check in the if statement and refreshed a few times.

Without my change:

with plaintext:
image

without plaintext:
image

With my change:

with plaintext:
image

without plaintext:
image

Checklist

  • I have read the contribution guidelines
  • I have targeted this PR against the correct branch (master for website changes, dev for
    source changes)
  • This is either a bugfix, a documentation update, or a new feature that has been explicitly
    approved via an issue
  • I ran the test suite locally (npm run test) and verified that it succeeded

@kubeden
Copy link
Contributor Author

kubeden commented Jul 11, 2024

@Telroshan sorry, I tried to rebase but unsuccessfully so I hard resetted to upstream/dev which resulted in my pull request being closed (the old one).

This only has my change.

Let me know if anything's wrong.

@Telroshan Telroshan added bug Something isn't working ready for review Issues that are ready to be considered for merging 2.0 labels Jul 12, 2024
@1cg 1cg merged commit 0f3b2b4 into bigskysoftware:dev Jul 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0 bug Something isn't working ready for review Issues that are ready to be considered for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants