On Tue, 24 Jan 2017 21:22:30 GMT, Sönke Ludwig wrote:

It seems like the input tag has sone text contents or child elements, but the HTML standard prohibits any contents (it's just <input ... /> without a separate closing tag).

Having similar trouble, usually easily fixed because technically they are HTML errors tolerated by the earlier implementation of diet templates. However, there are now some odd interactions with white space, interspersed D code and template inheritance.

In all of the cases below, the template code was functioning and producing the HTML I expected in detail before I moved the project to diet-ng.

1.
I had a link tag in the head of a top level template used to inherit from, followed by a block declaration.

        link(rel="icon", type="image/png", href="images/favicon.png")
        block header

The compiler complained that the link tag had contents when this file was compiled. A blank line between the two solved this problem. There was no inappropriate extra indentation in any f the files inheriting from this so substituted tags should have been at the same nesting level not nominally inside the link tag.

2.
I had an input tag that was the last line in a file that inherited from the above, and that tag was at the end of code that replaced block content that was the very last line therein. So the input tag would nominally be placed last in HTML output followed by no visible text.

The compiler complained that the input tag had contents. Both the top level template and the inheriting file had a newline at the end of their last visible lines, but no characters followed either of those newlines. When I removed the newline from the end of the input tag definition at the end of the inheriting file, the problem went away.

3.
I had one of two input tags being produce by if all inside a div tag, which in turn was followed by another div tag, i.e. one at the same level as the div tag containing the branch.

The compiler complained that the input tag had contents. Placing a blank line after the last input tag in the branch before the next div fixed the problem.

All these troubles look like bugs to me. Am I mistaken?