[wp-trac] [WordPress Trac] #47598: Malformed string in code example
WordPress Trac
noreply at wordpress.org
Mon Jun 24 12:53:56 UTC 2019
#47598: Malformed string in code example
--------------------------+-----------------------------
Reporter: avenirer | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
In here: https://make.wordpress.org/core/handbook/best-practices/coding-
standards/javascript/#multi-line-statements
{{{#!javascript
// Bad
var html = '<p>The sum of ' + a + ' and ' + b + ' plus ' + c
+ ' is ' + ( a + b + c ) + '</p>;
// Good
var html = '<p>The sum of ' + a + ' and ' + b + ' plus ' + c +
' is ' + ( a + b + c ) + '</p>;
}}}
Should be:
{{{#!javascript
// Bad
var html = '<p>The sum of ' + a + ' and ' + b + ' plus ' + c
+ ' is ' + ( a + b + c ) + '</p>';
// Good
var html = '<p>The sum of ' + a + ' and ' + b + ' plus ' + c +
' is ' + ( a + b + c ) + '</p>';
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47598>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list