V
V
Vadim Belkin2015-05-14 10:46:59
Pug
Vadim Belkin, 2015-05-14 10:46:59

Is it possible to indent between lines of code in assembled html using Jade?

When using Jade, there is no indentation between lines in the resulting html. How can I put them in the right places. I would like to delimit some parts of the page.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Malinochkin, 2015-05-15
@BelkinVadim

You can use this construction for this:
For example, like this:

body
  section: h2 Section 1	
  = '\n'
  section: h2 Section 2

After compilation it will be:
<body>
  <section>
    <h2>Section 1</h2>
  </section>

  <section>
    <h2>Section 2</h2>
  </section>
</body>

Or the commented variant suggested by Homsa Toft .

H
Homsa Toft, 2015-05-14
@kostein

As a comment option.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question