A
A
Anton Sereda2021-06-04 18:31:08
HTML
Anton Sereda, 2021-06-04 18:31:08

How to implement correct html code refactoring in PhpStorm?

The fact is that I use the Pug template engine / preprocessor. And at the exit, he gives me the assembled html page in one line. After that I use Cmd + Option + L and this hotkey copes, but only half. Somewhere there are correct transfers, somewhere wrong. Please tell me, maybe some specific Settings in CodeStyle -> HTML should overcome this problem?

Pug code

60ba4637eb386898599712.png

Html code, which was assembled after Cmd + Option + L, I would like the h4 tag to be on the same nesting as h3, as in Pug

60ba464147b01345204071.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daniil Maslov, 2021-06-04
@AntoshJkeee

Add --prettyto Preferences / Settings | tools | File Watchers | Pug | Arguments .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question