문제

I have a problem with code formatting in Intellij Idea 12.1.6. My issue regards breaking lines like that:

<div class="underline">R</div>eject

The above line after applying code formatting is formated like that:

<div class="underline">R</div>
eject

I have looked through Idea's code style settings but have not found any relevant setting.

Have anyone has any idea which setting is responsible for such formatting?

도움이 되었습니까?

해결책

I tested that the following changes the behavior as per your requirements:

(The numbers in the following steps map to the numbers in the screenshot)

  1. Go into Intellij IDEA Settings -> Code Style (1) -> HTML (2) -> Other (3)
  2. Then, under Don't break if inline content add 'div' by clicking on (4) and then (5).

After that attempting to format your code snippet does not push down extent into the next line.

enter image description here

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top