Opened 7 years ago
Closed 4 years ago
#43534 closed defect (bug) (maybelater)
Wonky element attributes after coding standards cleanup
Reported by: | johnbillion | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.1 |
Component: | Administration | Keywords: | has-patch needs-refresh |
Focuses: | coding-standards | Cc: |
Description
After [42343], the language attributes of the <html>
tags in the admin area have gotten too much indentation and too many line breaks.
See _wp_admin_html_begin()
.
Attachments (3)
Change History (15)
#1
@
7 years ago
- Keywords has-patch added; needs-patch removed
Created patch 43534.diff to fix unnecessary indentation and line breaks.
#2
@
7 years ago
@chetan200891 Thanks for the patch. Unfortunately the patch does not comply with the coding standards. Would you like me to have a closer look at how to fix this in an alternative way ?
#3
@
7 years ago
Worth noting there are several cases where indentation has been altered after [42343]. Couple quick examples:
#5
@
7 years ago
Noticed a few more cases, not sure they should be fixed here.
https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/meta-boxes.php?rev=42827#L760
https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/template.php?rev=42827#L2168
https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/template.php?rev=42827#L2180
#6
@
7 years ago
- Summary changed from Wonky language attributes after coding standards cleanup to Wonky element attributes after coding standards cleanup
This ticket was mentioned in Slack in #core by afercia. View the logs.
7 years ago
#10
@
6 years ago
43534.2.diff fixes the first example in a coding standards compliant way.
Most modern editors will recognise HTML
being used as the heredoc delimiter, and continue to syntax highlight the block of HTML correctly, though the two I tested (VSCode and Sublime Text) get a little confused over the <html>
tag not being closed within the same heredoc.
Created patch to fix indentation and line breaks.