-
Notifications
You must be signed in to change notification settings - Fork 22
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
Missing indentation on code block #300
Comments
Unfortunately the examples given above aren't in the content on the staging site, eg. the https://developer.wordpress.org/redesign-test/reference/functions/register_post_type/#flushing-rewrite-on-activation section doesn't exist. @StevenDufresne do you know if/how we can get the staging content to be on par with prod please? |
Running the cron jobs passing the |
Line 16 in 1892b50
Docs: https://developer.wordpress.org/cli/commands/cron/event/run/ |
Looks like we fixed something in the parsers because https://developer.wordpress.org/redesign-test/reference/functions/register_post_type/#flushing-rewrite-on-activation is there now, and indentation does still look broken |
How it was fixed was mentioned in this PR description Note I Section, if anyone is interested in it, please take a look. |
Summary of the issue: Root cause: This seems to be a longstanding issue. It arises from the lack of indentation when inputting in the editor. To fix it, we would need to add indentation to the PHP snippets in the editor's text view. Additionally, there's no need to add extra pre tags; if we do, we'll need to include additional classes and place it inside the [php] shortcode. Otherwise, the sticky header will break. As shown in this link, geisthanen manually converted the original code, which lacked indentation, into content with Prism-style classes wrapped in Regardless, to modify the indentation issue, it means filtering the user's content input in the editor. I've tried formatting Currently, I've manually fixed the indentation on the WP_Query and register_post_type pages, one of which had dozens of snippets... Other pages might also have this issue, and manually fixing them doesn't make good sense. Additionally, I've also fixed some issues with the sticky header breaking due to incorrectly added |
Initially reported in slack #meta channel.
Description
On the current developer documentation, some code blocks are missing indentation when displaying multiple lines (see attached screenshot).
Examples where this issue can be seen : WP_Query reference or register_post_type
Screenshot
The text was updated successfully, but these errors were encountered: