History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEA-15597
Type: New Feature New Feature
Status: Open Open
Assignee: Maxim Mossienko
Reporter: AlexL
Votes: 2
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
IDEA: Feedback

Javascript - Reformat Code doesn't respect Force Braces ON code style settings

Created: 10 Oct 07 01:27   Updated: 10 Oct 07 13:41
Component/s: Code Formatting and Code Style

File Attachments: None
Image Attachments:

1. 7330_code_style_settings_alignment_and_braces.png
(66 kb)
Environment: Windows XP SP2

Build: 7,330
Severity: High


 Description  « Hide
Given this javascript code:
TestJavascriptReformat.html
<html>
<script type="text/javascript">
function foo(i) {
    if (i > 0)
        return false;
    else
        return true;
}
</script>
</html>

If I reformat, I get the following:

TestJavascriptReformat.html – After Reformat
<html>
<script type="text/javascript">
    function foo(i) {
        if (i > 0)
            return false; else
            return true;
    }
</script>
</html>

This is really wrong considering I have "Force Braces" on



 All   Comments   Work Log   Change History      Sort Order:
Maxim Mossienko - 10 Oct 07 13:41
I do not see traces about that this functionality was ever present in Javascript