Skip to content

4.10.0 release

Compare
Choose a tag to compare
@dmbaturin dmbaturin released this 22 Apr 09:12
· 12 commits to main since this release

Release blog post: https://soupault.app/blog/soupault-4.10.0-release/

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.

[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)