Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8964477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:35:58+00:00 2026-06-15T16:35:58+00:00

Whenever I render a JADE template, I get all HTML in a single line.

  • 0

Whenever I render a JADE template, I get all HTML in a single line. This makes it difficult to read in view-source mode. How can I tell JADE to create HTML which is properly indented?

Here is my template:

#application
  p#docs
    a(href='/docs/index.html') Documentation

  p#user-input
    input#msg(name='msg', size='50')
    input#submit(name='submit', type='submit', value='Send a Message')

  ul#messages
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T16:35:59+00:00Added an answer on June 15, 2026 at 4:35 pm

    In Jade’s compiling options set pretty to true.

    Which can be done in multiple ways depending of how you are compiling them

    • From the command line pass the -P or --pretty flag.
    • From express 3.x: app.locals.pretty = true;

    (express 2.x used a different syntax: app.set('view options', { pretty: true });, see migration guide: https://github.com/visionmedia/express/wiki/Migrating-from-2.x-to-3.x)

    Then you can do the following

    #test.     // <-- notice the dot
        Lorem Ipsum is simply dummy text of 
        the printing and typesetting industry. 
        Lorem Ipsum has been the industry's standard dummy 
        text ever since the 1500s ,
        when an unknown printer took a galley of type and scrambled 
    

    which will produce

    <div id="test">
        Lorem Ipsum is simply dummy text of 
        the printing and typesetting industry. 
        Lorem Ipsum has been the industry's standard dummy 
        text ever since the 1500s ,
        when an unknown printer took a galley of type and scrambled 
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm going to keep this short, I'm just trying to render a jade template
Whenever I try installing anything using gem, I get this error - murtaza@murtaza-dev:~$ sudo
I want to render a view when a collection has been loaded asynchronously from
I'd like to use Jinja2 with a Django project. I'm using this template loader
Whenever display text in an HTML document I always put it through htmlentities for
I'm doing this inside one of my Views: render: function($options) { ... this.collection.on('reset', _(function()
Whenever I attempt to render a textured quad, I end up with a triangular
I have this ajax request which is being called whenever I change an input
Whenever we use an index array to render textured polygons with glDraw*Elements*, we can
Whenever there is an error in an inherited Jinja2 template in my App Engine

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.