M
M
myskypesla2017-01-19 16:56:25
css
myskypesla, 2017-01-19 16:56:25

How to properly configure gulp-pug (jade)?

When using pretty: true, gulp-pug compiles the code like this:

<div><a>Ссылка 1</a><a>Ссылка 2</a><a>Ссылка 3</a></div>

And you need it like this:
<div>
  <a>Ссылка 1</a>
  <a>Ссылка 2</a>
  <a>Ссылка 3</a>
</div>

Tell me how to configure or which package to use to get the result that I need?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
R
Ranwise, 2017-01-19
@Ranwise

.pipe(pug({pretty: true})) try

Y
Yuri Oliyarnyk, 2017-01-19
@FoxPro111

a is an inline element, so the compiler will emit this,
or put up with what the compiler produces, or make a different structure

O
Oleg, 2017-01-19
@werty1001

How to nest html inline tags after jade compilation?

K
Konstantin Davydov, 2017-05-05
@space_pancake

For such a task, I connected gulp-html-prettify

D
Dmitry, 2018-02-10
@kaktys123

4webfan.ru/pug-gulp I'm also looking for a solution so far I've only found this working

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question