Skip to content

Fix whitespace view in code #2043

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 4 commits into from
Dec 23, 2024

Conversation

thesayfulla
Copy link
Contributor

Fixes #2041

@tim-schilling
Copy link
Member

tim-schilling commented Dec 23, 2024

Thank you @thesayfulla for pushing this forward. I updated your approach quite a bit. Let me know what you think. The whitespace wasn't being respected in my testing until I adjusted the .w class styles to use white-space: pre-wrap.

I took it a step further and regenerated the pygments styles so that we get the color highlighting too.

Screenshot 2024-12-23 at 8 32 53 AM

@matthiask I think this is how the toolbar used to do things, but I suspect some of the details were lost to time.

Copy link
Member

@matthiask matthiask left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that's excellent!

@tim-schilling
Copy link
Member

@thesayfulla if you're good with the result, we can merge this in.

@thesayfulla
Copy link
Contributor Author

@tim-schilling Great job! I really liked it - let's move ahead and merge it.

@tim-schilling tim-schilling merged commit e96e53f into django-commons:main Dec 23, 2024
25 checks passed
@thesayfulla thesayfulla deleted the whitespace-rendering branch December 23, 2024 17:30
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Template panel does not render <script> tag correctly
3 participants