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 formatting on HTML and CSS code #2646

Closed
jonathanbossenger opened this issue Jul 8, 2024 · 4 comments
Closed

Code formatting on HTML and CSS code #2646

jonathanbossenger opened this issue Jul 8, 2024 · 4 comments
Labels
[Component] Learn Theme Website development issues related to the Learn theme.

Comments

@jonathanbossenger
Copy link
Collaborator

When adding code snippets using the Code block and setting the language setting to either HTML or CSS, even if they are correctly formatted in the code block, they appear in one line on the front end.

Example lesson: https://learn.wordpress.org/lesson/css/

This happens in both the current theme and the new theme.

learn wordpress org_lesson_css_

@jonathanbossenger
Copy link
Collaborator Author

@StevenDufresne would you have a moment to check on what could cause this?

I'm guessing it's something that needs to be fixed upstream on the WordPress.org codebase, but not sure where to start looking

@adamwoodnz adamwoodnz added the [Component] Learn Theme Website development issues related to the Learn theme. label Jul 8, 2024
@adamwoodnz adamwoodnz added this to the Learning Pathways launch milestone Jul 8, 2024
@StevenDufresne
Copy link
Contributor

It has something to do with how you pasted it. I moved it over to my code editor, copied and repasted and everything seems to be working as it should.

@StevenDufresne
Copy link
Contributor

Since there's a simple fix, I've closed this ticket but if it's related to an automated process or something similar, I can investigate further. Does that work?

@jonathanbossenger
Copy link
Collaborator Author

Ooo interesting, thanks @StevenDufresne I didn't even think of that.

I paste from Markdown into the Block editor, so it might be something related to how my Markdown is configured.

I'll watch for this in the future to figure out if I'm doing it wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Learn Theme Website development issues related to the Learn theme.
3 participants