Hacker News new | ask | show | jobs
by zfgnu 2513 days ago
That html code in lore.kernel.org is weird, I wonder how it's generated.
1 comments

It's a somewhat common trick I believe. The idea is this; you want newlines inbetween your tags, but if you have HTML code like `<div>foo</div>\n<div>bar</div>`, you end up with an unwanted text node with a space inbetween the divs which changes how the page looks. By putting the newline inside the tags instead of between them, you don't have any unwanted text nodes.