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 blocks in the Theme Developer Handbook are missing line breaks #453

Closed
bacoords opened this issue Sep 19, 2022 · 4 comments
Closed
Assignees
Labels
developer documentation (DevHub) Improvements or additions to developer documentation [Status] Done Issue is completed themes Issues for Theme Developer Handbook tracking issue Use to track a series of related issues.

Comments

@bacoords
Copy link

Issue Description

The Theme developer handbook has code blocks with PHP code examples, but the line breaks are missing. This causes the code to just stack up and is pretty un-readable. I've tested this logged in as well and on various browsers to make sure it wasn't just a cache issue.

URL of the Page with the Issue

https://developer.wordpress.org/themes/template-files-section/page-template-files/

Section of Page with the issue

Most sections but starts here: Creating Custom Page Templates for Global Use
As you get further into bigger chunks of code it gets worse.

Why is this a problem?

It's extremely hard to read the code blocks- especially longer ones further down the page.

Suggested Fix

Add the line breaks. Maybe it's a parsing issue with the newer code block UI?

@bacoords bacoords added the tracking issue Use to track a series of related issues. label Sep 19, 2022
@carolinan carolinan added the themes Issues for Theme Developer Handbook label Feb 22, 2023
@github-actions
Copy link

Heads up @kafleg @carolinan @TeBenachi - the "themes" label was applied to this issue.

@zzap zzap added the developer documentation (DevHub) Improvements or additions to developer documentation label Mar 13, 2023
@zzap zzap added the [Status] To do Issue marked as Todo label Sep 18, 2023
@adamwoodnz
Copy link

This page is still using a classic editor block, any reason it can't be converted to blocks like more recent pages which don't have the issue?

@bacoords
Copy link
Author

I'll tag @justintadlock who has also done a lot of work on the handbooks.

@justintadlock justintadlock self-assigned this May 14, 2024
@github-actions github-actions bot added [Status] In progress Issue is in progress and removed [Status] To do Issue marked as Todo labels May 14, 2024
@justintadlock
Copy link

This page is slated for a full update as part of the overhaul: #816

But I went ahead and converted it to blocks and switched out the old shortcodes for code and notices/tips/alerts for the Code and Notice blocks.


@adamwoodnz - It was still using the old [php] shortcode, so I'm guessing there are other pages in various Dev Resources handbooks that might use that. I'm not sure where that shortcode comes from (some plugin, I guess).

@github-actions github-actions bot added [Status] Done Issue is completed and removed [Status] In progress Issue is in progress labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer documentation (DevHub) Improvements or additions to developer documentation [Status] Done Issue is completed themes Issues for Theme Developer Handbook tracking issue Use to track a series of related issues.
Projects
None yet
Development

No branches or pull requests

5 participants