3 ms·
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> insi
by ericfontaine 12y 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)
- icantthinkofone 12y agoBecause whitespace matters in HTML.
- ericfontaine 12y agogood point, but could you elaborate?
- icantthinkofone 12y agoOne 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.
- TheAceOfHearts 12y agoThis is basically jade[0]. Although jade isn't quite as smart, so the expression you wrote would be considered invalid. [0] jade-lang.com
- ericfontaine 12y agointeresting. Very clean looking.
- jaredmcateer 12y agoYou absolutely have to split jade documents and use includes/blocks though, any decent sized page, even if it's static becomes unmanageable very quickly.
- ufo 12y agoThis is good for hand-written html but annoying for machine-written html.
- ericfontaine 12y agomachine would just have to count '/t' tabs at beginning of each line to parse. Is that any slower than scanning every character for '<'?