For soupault, that means that it's impossible to write plugins that translate fake elements in <head> to real, valid HTML. For <body>, such an approach proved very fruitful — it serves the same role as "shortcodes" in other SSGs but it's a lot more flexible (see https://soupault.app/plugins/#augmented-html).
There are use cases for extending <head> in the same manner, but lambdasoup makes that impossible at the moment.
Do you think there could be an option to allow that, or that moving unusual elements to the body may be an overcorrection? Or are there problems that can only be solved by the current behavior that I fail to see?
As I recall, this behavior is part of the error correction specified in the HTML5 spec. Disabling it as an option would have to be added to Markup.ml. I would probably merge a PR that does so.
Right now, if lambdasoup encounters a non-standard element in
<head>
, it moves that element to<body>
.For soupault, that means that it's impossible to write plugins that translate fake elements in
<head>
to real, valid HTML. For<body>
, such an approach proved very fruitful — it serves the same role as "shortcodes" in other SSGs but it's a lot more flexible (see https://soupault.app/plugins/#augmented-html).There are use cases for extending
<head>
in the same manner, but lambdasoup makes that impossible at the moment.Do you think there could be an option to allow that, or that moving unusual elements to the body may be an overcorrection? Or are there problems that can only be solved by the current behavior that I fail to see?