D
D
Dmitry2017-06-12 14:44:15
HTML
Dmitry, 2017-06-12 14:44:15

How to fix Gulp compilation of inline elements from Pug(ex-JADE) to HTML?

Good day.
Can you please tell me how to make it so that when compiling Gulp from .pug files to .html, links and spans are wrapped on a new line?
This is how the .pug code looks like
eb650d01918a429c980f0f7cb483a26a.jpg
This is how it compiles to .html
cd46f932435a4bfbaa79584c22eba2d2.jpg
And I want the html to look like this:
fa9f73048f66482f8b80f6646874d23e.jpg
Here is the gulp-task responsible for compiling pug files.
855961ec3bb148aa9baebacaedd55a1a.jpg

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Den Totsky, 2017-06-12
@Odinokun

It seems to me that we need to look towards gulp plugins that format html after pug compilation. Something like gulp-html-beautify

O
Oleg, 2017-06-12
@werty1001

#answer_844626

G
Georgy Bukharov, 2017-06-22
@thousandsoulz

Or use the indentation character ' | ', here is the documentation .

|
a(href='#')lorem
|
|
a(href='#')ipsum
|
|
a(href='#')dolor

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question