Fix formatting of markup in the docs for WP_HTML_Tag_Processor#4419
Fix formatting of markup in the docs for WP_HTML_Tag_Processor#4419johnbillion wants to merge 1 commit intoWordPress:trunkfrom
WP_HTML_Tag_Processor#4419Conversation
|
Thanks @johnbillion - I was under the impression the indentation was required, but I've double-checked after this change and the code still renders as code at least in PHPStorm and VSCode. |
|
@johnbillion what was wrong with the U+FFFD note? |
Yeah you just need either the backticks or the indentation but not both 😄
It was just to remove the unprintable character from the source code 👍
Yeah the docs on the developer reference site only get regenerated from the source when each new version of WordPress is released |
ahaa
that character is printable though, and it printed maybe it's confusing because that character is the character used when the string has invalid characters in it? I think maybe it was a mistake to remove. we added that originally to show what it is, thinking people would more readily recognize � than |
|
Ohhhh that is the actual unicode character displayed as a replacement when a character is unprintable? I see. |
|
@johnbillion do you have any thoughts about me adding it back in? maybe surround it in quotes this time to try and make it more obvious that it's the actual character? sorry this wasn't caught in review. I would have noted it, but the PR was created and merged while I was still asleep |
In this "blessed" patch we're backporting some udpates coming from Core in the Tag Processor, namely a major fix to a rare bug that occurs when making changes and then seeking to an earlier position in a document. - Preserve internal cursor across updates [#4371](WordPress/wordpress-develop#4371) - Update code example formatting to fix Developer Resources docs [#4419](WordPress/wordpress-develop#4419) - Update whitespace formatting to pass Gutenberg linter [#4433](WordPress/wordpress-develop#4422)

Trac ticket: https://core.trac.wordpress.org/ticket/57840
There's many helpful code examples in the docs for the
WP_HTML_Tag_Processorclass but they're all indented by four unnecessary spaces. They use the```phpwrapper which makes the indentation appear in the code blocks on the developer reference site. This fixes that by removing the extraneous indentation.There's also an additional fix for the note about the
U+FFFDcharacter.Example URLs that display the unnecessary indentation: