user1663023
user1663023

Reputation:

Exclude certain code from being auto formatted in WebStorm

WebStorm auto-formats my js file perfectly.

However, there is a situation I want to exclude some code from being auto-formatted, like anything between <pre><code> and </code></pre>. Auto-format introduces new white spaces. Normally it's not a problem. However, I want to preserve the white spaces between my <pre><code> and </code></pre> tags.

Upvotes: 1

Views: 84

Answers (1)

LazyOne
LazyOne

Reputation: 165353

  1. Settings/Preferences | Editor | Code Style
  2. HTML | Other
  3. Make sure that such tags are listed in Keep white spaces inside list

Upvotes: 2

Related Questions