millermedeiros/esformatter — pull request #55 by jzaefferer (2013-08-14 09:20:53+00:00)
Title: Conditional statement - fixes #6

Comments and line breaks inside ConditionalExpression. Fixes #6

Removes the removal of line breaks, since we don't know when those should be added back. Instead the consequent and alternate after a line break are indented properly. Accordingly I had to remove the line breaks in single-line test.

Getting comments to intend properly as well required a special path within indent.getCommentIndentLevel. All attempts to modify the existing logic failed to provide useful results. Instead of now applies the same logic to figure out the level as for the code itself.