N
N
nomadru2020-01-08 11:20:00
HTML
nomadru, 2020-01-08 11:20:00

Gulp and auto indentation in html?

Hello.
I'm trying to collect html files through gulp and ran into difficulty.
When inserting one file into another part of the tags moves to the beginning of the line.
For example:

<header>
    <nav>
      <!-- элементы меню -->
</nav>
</header>

Closing tags and moved to the beginning of the line.
It should be like this:
<header>
    <nav>
      <!-- элементы меню -->
    </nav>
</header>

For assembly I tried "rigger", "Pug", "Nunjucks". The effect is the same.
Now I settled on "Nunjucks", I just liked it, I wanted templates in html and plus its capabilities.
Is there a possibility to fix this?
Perhaps an auto-indent plugin?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dymok, 2020-01-08
@nomadru

https://www.npmjs.com/package/gulp-html-beautify

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question