Javascript code style question?

I am having problems with getting code styles to work in a JavaScript block inside a JSP page. The code completed text does not align up. For example I am in the middle of a function and I start an if statement and type the opening { and hit enter. IDEA generates the closing } but it always places it in column 1 so the code looks like this:

The two closing brackets were inserted by IDEA but instead of indenting them they were inserted at column 1.

Can someone tell me how I can fix this. It works correctly in Java files and java scriptlets inside a jsp page. It just does not work in JavaScript.


I am using IntelliJ IDEA 5.1.2 Build #4267

Message was edited by:
Ben Shamsian

Please sign in to leave a comment.