Make WordPress Core

Opened 7 years ago

Closed 4 years ago

#43534 closed defect (bug) (maybelater)

Wonky element attributes after coding standards cleanup

Reported by: johnbillion's profile 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)

Screen Shot 2018-03-12 at 20.47.19.png (71.3 KB) - added by johnbillion 7 years ago.
43534.diff (1.6 KB) - added by chetan200891 7 years ago.
Created patch to fix indentation and line breaks.
43534.2.diff (1.3 KB) - added by pento 6 years ago.

Download all attachments as: .zip

Change History (15)

@chetan200891
7 years ago

Created patch to fix indentation and line breaks.

#1 @chetan200891
7 years ago

  • Keywords has-patch added; needs-patch removed

Created patch 43534.diff to fix unnecessary indentation and line breaks.

#2 @jrf
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 ?

#6 @johnbillion
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

#8 @pento
6 years ago

  • Milestone changed from 5.0 to 5.1

#9 @afercia
6 years ago

For meta-boxes.php see #43259.

@pento
6 years ago

#10 @pento
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.

#11 @peterwilsoncc
6 years ago

  • Milestone changed from 5.1 to Future Release

It's late in the release cycle and browsers treat line breaks within HTML tags the same as spaces. It's wonky but won't be problematic.

Please continue to add further examples to this ticket.

#12 @johnbillion
4 years ago

  • Milestone Future Release deleted
  • Resolution set to maybelater
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.