Hakyll生成奇怪的HTML – 任何人都可以解释原因吗?

Hakyll生成奇怪的HTML – 任何人都可以解释原因吗?,第1张

概述我使用Hakyll生成一些文档,我注意到它有一种奇怪的方式来关闭它生成的代码中的 HTML标记. 有一个页面,他们说你必须像他们一样生成标记,否则你的页面布局会在某些条件下被破坏,但我现在找不到它. 我创建了一个小测试页面(下面的代码),它有一个带有“普通”HTML标记的红色图层,以及一个带有类似于hakyll生成的标记的黄色图层. 我看不出两个div之间的Firefox有什么不同. 任何人都可以 我使用Hakyll生成一些文档,我注意到它有一种奇怪的方式来关闭它生成的代码中的 HTML标记.

有一个页面,他们说你必须像他们一样生成标记,否则你的页面布局会在某些条件下被破坏,但我现在找不到它.

我创建了一个小测试页面(下面的代码),它有一个带有“普通”HTML标记的红色图层,以及一个带有类似于hakyll生成的标记的黄色图层.

我看不出两个div之间的firefox有什么不同.

任何人都可以解释他们说的是真的吗?

<HTML><body><!-- norMAL STYLE --><div ><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's methods.</p></div><!-- HAKYLL STYLE --><div ><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,make calls to it through this instance's methods.</p></div></body><HTML>
解决方法 它实际上是 pandoc生成HTML代码. Pandoc问题跟踪器中有一个很好的解释:

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

The reason is because any whitespace (including newline and tabs) between HTML Tags will cause the browser to insert a space character between those elements. It is far easIEr on the machine logic to leave these spaces out,because then you don’t need to think about the possible ways that the HTML text formatting Could be messing with the browser adding extra spaces.

总结

以上是内存溢出为你收集整理的Hakyll生成奇怪的HTML – 任何人都可以解释原因吗?全部内容,希望文章能够帮你解决Hakyll生成奇怪的HTML – 任何人都可以解释原因吗?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1076978.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-26
下一篇 2022-05-26

发表评论

登录后才能评论

评论列表(0条)

保存