Hacker News new | ask | show | jobs
by ericfontaine 4115 days ago
how about just use whitespace, like python:

  div class="red"
    p
      Hello, World!
(of course I know would not look nice if had to place <b>tags</b> inside of single line of text, and might get a little too indenty)
3 comments

This is basically jade[0]. Although jade isn't quite as smart, so the expression you wrote would be considered invalid.

[0] jade-lang.com

interesting. Very clean looking.
You absolutely have to split jade documents and use includes/blocks though, any decent sized page, even if it's static becomes unmanageable very quickly.
Because whitespace matters in HTML.
good point, but could you elaborate?
One quick example.

Certain elements are, or can be made to be, "inline" which gets them treated the same as characters on a line. Thus those elements, such as an image, will have white space between them as a word does in a paragraph. If you butt those element's tags right next to each other, with no white space between them, then there will be no white space on the displayed page.

This is good for hand-written html but annoying for machine-written html.
machine would just have to count '/t' tabs at beginning of each line to parse. Is that any slower than scanning every character for '<'?