thymeleaf / thymeleaf-extras-conditionalcomments

Thymeleaf "extras" dialect for correctly processing IE conditional comments (for Thymeleaf 2.x)
https://www.thymeleaf.org
Apache License 2.0
20 stars 6 forks source link

Newline issues #1

Closed gabrielbauman closed 11 years ago

gabrielbauman commented 11 years ago

While parsing of conditional comments works well using this module, it seems to "eat" the newline immediately before each conditional comment tag and add it immediately after.

So, this:

<link rel="stylesheet" th:href="@{/assets/css/styles.css}" />
<!--[if lt IE 9]><script th:src="@{/assets/js/html5shiv.js}"></script><![endif]-->
</head>

becomes this:

<link rel="stylesheet" href="/assets/css/styles.css" /><!--[if lt IE 9]><script src="/assets/js/html5shiv.js"></script><![endif]-->

</head>

It looks like a newline is added after the comment as well.

Not sure if this affects IE's parsing of conditional comments, but it's certainly a style issue.

gabrielbauman commented 11 years ago

Actually, this seems to happen after any comment at all. Looks to be an issue with ThymeLeaf's comment writing, not this module.

danielfernandez commented 11 years ago

For the sake of documentation: this is linked to https://github.com/thymeleaf/thymeleaf/issues/151