How can you control line spacing in javascript formatting

i like a blank line after my break statement in a switch.  when i ran the formatter it got rid of all my blank lines and i can't find a setting that would let me restore them.  does such a setting exist?

Comment actions Permalink

Hello Dan
     There's no such setting yet. However, ReSharper formatter should not remove existing blank lines if the 'Keep max blank lines in code' option is set to at least '1' under Blank Lines and Wrapping. Thank you!

Andrey Serebryansky

Software Developer

JetBrains, Inc

"Develop with pleasure!"

Comment actions Permalink

i went back and checked my settings and i am using that setting and value.

i took an aspx file where this is happening in embedded javascript, reinserted the blank lines and did a cleanup, and the cleanup removed the blank lines.

as a double check i then opened up the profile that i always use and check its settings.  it was also set as you suggested.

i then browsed and saw that the setting "keep existing line breaks" was unchecked. i checked that, saved the profile and did a cleanup and the line breaks were removed.

clearly there is something else at play here, perhaps the .aspx extension on the file?


Please sign in to leave a comment.