~dmbaturin/soupault

4.1.0 release

Details
Message ID
<0d636a26-5ae3-4d7c-9322-3b7db5870b80@baturin.org>
DKIM signature
missing
Download raw message
Hi everyone,

Soupault 4.10.0 release is available now: 
https://soupault.app/blog/soupault-4.10.0-release/

Here's what changed:

## New features

### Deleting only elements that do not have certain children

The `delete_element` widget has a new option: `when_no_child`.

For example, suppose you have footnotes container in your template that 
looks like this:
`<div id="footnotes"> <hr class="footnotes-separator"> </div>`. If a 
page has footnotes,
it would contain something like `<p class="footnote">...`. If not, it 
would only have the `<hr>` element in it.

Deleting it from pages that don't have any footnotes cannot be done with 
`only_if_empty`
because the container has that auxilliary element in it.

However, with the new option you can make the widget delete the container
only if nothing inside it matches the selector of actual footnotes.

```toml
[widgets.clean-up-footnote-containers]
   after = "footnotes"
   widget = "delete_element"
   selector = "div#footnotes"
   when_no_child = "p.footnote"
```

## Bug fixes

* Complete HTML pages work correctly in generator mode again (report by 
Auguste Baum)
* Config files with multiline strings and Windows newlines (CRLF) no 
longer cause parse errors
   (report by Bohdan Kolesnikov)
* Configs that consist of a single comment line followed by EOF no 
longer cause parse errors
   (found thanks to the TOML test suite v1.4.0)
Reply to thread Export thread (mbox)