|
I looked into this in Jelly, and realized that the original whitespace normalization rules in Jelly is messed up. It appears to be modeled after the whitespace normalization in XSLT — that is, 1. designated elements marked as "preserve whitespace" will keep their whitespace. The "bug" that makes Jelly behave differently from XSLT is the whitespace normalization handling when expressions ${...} are involved. In which case the leading and trailing whitespace is stripped. IOW, "<a> CR text CR </a>" would evaluate to "<a> CR text CR </a>" without any change, but "<a> CR ${expr} CR </a>" would evaluate to "<a>${expr}</a>", except when expressions show up in the mixed content model, so "<a> CR ${expr} <b/></a>" would still evaluate to "<a> CR ${expr} <b/></a>". IMHO, this is a mess. I'm pretty sure the same logic can be restored, but I'm entertaining the possibility that maybe we can take a hit and bring in a consistent whitespace normalization rule. The obvious other arguments are that the compatibility is a king and we haven't heard from anyone so far complaining the old strange whitespace normalization rule (including myself.) Any thoughts? Does the code in place now have a "consistent whitespace normalization rule", or would further changes be needed? Guess I'm ok either way.. I'm sure I've hit oddities here, but when I did I just added/removed whitespace to make it work as I wanted and moved on. "Fixing" this will likely lead to minor issues filed over the next several releases as people find affected jellies (or can we find these cases somehow?).. one could argue that a change that makes people need to use <j:whitespace> a lot isn't really an "improvement" though Code changed in hudson |
||||||||||||||||||||||||||||||||||
I guess change for
HUDSON-5632can be reverted if a more general fix is made? (and changelog.html item adjusted)