0

How do i print nice formatted html?

I want something like app.locals.pretty = true. ExpressJS: how to output pretty html

1 Answers1

1

According to Text.Hamlet.Html's definition, Hamlet uses blaze-markup for its output. blaze-markup, in turn, has a renderer backend with the promising name Text.Blaze.Renderer.Pretty.

So I think what should work is if you run your Hamlet templates to get the final Html, and then render it yourself by calling Text.Blaze.Renderer.Pretty.renderMarkup.

Cactus
  • 27,075
  • 9
  • 69
  • 149