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

Code and tracebacks are ill-formatted on deployed site #40

Closed
nathanielknight opened this issue Mar 6, 2023 · 4 comments · Fixed by #41
Closed

Code and tracebacks are ill-formatted on deployed site #40

nathanielknight opened this issue Mar 6, 2023 · 4 comments · Fixed by #41

Comments

@nathanielknight
Copy link
Contributor

When I build the project locally the code and traceback examples on the site are properly formatted:

image

On the deployed site, the formatted code is missing line breaks:

image

It looks like the deployed site has a bunch of whitespace removed compared to the output of the build task.

@LeoDog896
Copy link
Contributor

This has to do with both parcel and the fact that there is no pre element to preserve whitespace. Parcel notices these <pre> elements and preserves the HTML whitespace. I'll see if I can make a fix for it.

@nathanielknight
Copy link
Contributor Author

I was looking at the docs, but I wasn't sure. A quick fix might be to set htmlnano to not strip whitespace?

@LeoDog896
Copy link
Contributor

That would work too - I'm currently testing out just wrapping the code in <pre>, but I'm being bottlenecked by my codespace setup. If it doesn't work, I'll let you know.

@LeoDog896
Copy link
Contributor

It worked! Making a PR now.

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 a pull request may close this issue.

2 participants