Hakyll is generating weird HTML - can anyone explain the reason?

I am using Hakyll to create some documentation, and I noticed that it has a weird way of closing HTML tags in code generation.

There was a page where they said that you should generate markup like them, or the layout of your page will be broken under some conditions, but I can not find it now.

I created a small test page (code below), which has one red layer with "normal" HTML markup and a yellow layer with markup similar to what hakyll generates.

I do not see the differences in Firefox between the two divs.

Can someone explain if what they say is true?

<html> <body> <!-- NORMAL STYLE --> <div style="background: red"> <p>Make available the code from the library you added to your application. Again, the way to do this varies between languages (from adding import statements in python to adding a jar to the classpath for java)</p> <p>Create an instance of the client and, in your code, make calls to it through this instance methods.</p> </div> <!-- HAKYLL STYLE --> <div style="background: yellow" ><p >Make available the code from the library you added to your application. Again, the way to do this varies between languages (from adding import statements in python to adding a jar to the classpath for java)</p ><p >Create an instance of the client and, in your code, make calls to it through this instance methods.</p ></div > </body> <html> 
+4
source share
3 answers

Actually pandoc that generates HTML code. There is a good explanation in the Pandoc tracker:

http://code.google.com/p/pandoc/issues/detail?id=134

The reason is because because any spaces (including newlines and tabs) between HTML tags will cause the browser to insert a space character between these elements. On machine logic, to leave these spaces, because then you do not need to think about possible ways to format HTML text can be messy with the addition of a browser extra spaces.

+5
source

There are times when removing the space between two tags will matter, especially when working with inline elements.

0
source

I ran neatly over him, and he corrected the unusual lines.

0
source

All Articles