[wp-meta] [Making WordPress.org] #754: Reduce tab size in code samples

Making WordPress.org noreply at wordpress.org
Tue Mar 31 18:15:56 UTC 2015


#754: Reduce tab size in code samples
--------------------------+-----------------------------------
  Reporter:  dboulet      |      Owner:
      Type:  enhancement  |     Status:  new
  Priority:  low          |  Component:  Codex
Resolution:               |   Keywords:  has-patch ui-feedback
--------------------------+-----------------------------------
Changes (by dboulet):

 * priority:  normal => low


Comment:

 I’ve attached a before/after screenshot of the page at
 https://developer.wordpress.org/reference/functions/add_shortcode/, the
 default tab size is shown on the left, and the right side displays the
 result of using `tab-size: 4;`. I actually cheated a little here, as the
 actual code samples on the page are indented using spaces. I altered the
 source code of the page, changing the indentation to tabs in order to
 demonstrate the potential for change in my screenshot.

 I’ve noticed that most code samples in the Codex and on
 developer.wordpress.org are indented using spaces, I’m assuming this is
 for consistency in spacing. My hope was that this change would allow the
 indentation in online code samples to be converted to tabs, in accordance
 with the [https://make.wordpress.org/core/handbook/coding-
 standards/php/#indentation WordPress PHP Coding Standards]. The main issue
 that I’m hoping to resolve is that I often copy/paste code from the Codex
 and end up with mixed indentation in my files.

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/754#comment:4>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list