| Summary: | Web Inspector: JS PrettyPrinting issues with ternary statement | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> |
| Component: | Web Inspector | Assignee: | Joseph Pecoraro <joepeck> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | graouts, joepeck, timothy, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | 412.x | ||
| Hardware: | All | ||
| OS: | All | ||
This will be fixed by Bug 156178. *** This bug has been marked as a duplicate of bug 156178 *** |
Ternary statement in a var declaration or global scope does not pretty print as expected. There should be a space before the ":" but there is not: TEST: var x=true?a:b; // wrong var x=(true?a:b); x=true?a:b; function() {var x=true?a:b;} // wrong OUTPUTS: var x = true ? a: b; // wrong var x = (true ? a : b); x = true ? a : b; function() { var x = true ? a: b; } // wrong NOTES: - The first wrong case the previous is "block", a.k.a. global scope here. - The second wrong case the pervious is "vardef". - I would have expected both of these to have previous be vardef.