tvl-depot/users/sterni/nix
sterni 3bd43e39dd feat(sterni/nix/html): flatten lists enclosed by an element
Currently nix/html requires that the content of an element is either an
HTML string (which may or may not be generated by the library) or a flat
list of HTML strings (which may or may not be generated by the library).

I've found that this requirement makes authoring more complex pages that
have programmatically generated parts cumbersome since one needs to take
care that returned lists are appended, not included as an element. This
leads to confusing code and annoying errors. We don't really care about
the nesting of a content list as long as the order is clear, so we can
just flatten the list making life a little easier:

    (<main> { } [
      (<section> { } (<h2> { } "static section"))
      listOfGeneratedSections
      (<section> { } (<h2> { } "another section"))
    ])

Change-Id: I06016a8eff01d34d7eaea7798a00ed191115f9c8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12908
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
2024-12-25 00:36:36 +00:00
..
build feat(sterni/nix/build): check in toPlainText 2024-12-07 01:06:28 +00:00
char refactor(users/sterni/nix): move generic number operation into num 2023-08-09 12:12:47 +00:00
float feat(sterni/nix): add trivial float library 2023-08-09 12:12:47 +00:00
flow style: format entire depot with nixpkgs-fmt 2022-01-31 16:11:53 +00:00
fun refactor(sterni/nix/fun): key can also be an int 2022-10-23 21:08:52 +00:00
html feat(sterni/nix/html): flatten lists enclosed by an element 2024-12-25 00:36:36 +00:00
int refactor(nix/sterni/int): rename div & mod to quot & rem 2023-08-09 12:12:47 +00:00
list feat(sterni/nix/lists): implement transpose 2024-03-10 18:05:32 +00:00
misc feat(sterni/nix/misc): predicate to check if isRestrictedEval 2022-06-01 10:30:37 +00:00
num feat(sterni/nix): add trivial float library 2023-08-09 12:12:47 +00:00
string chore: remove comments formerly meant for alignment 2023-05-31 10:55:07 +00:00
url style: format entire depot with nixpkgs-fmt 2022-01-31 16:11:53 +00:00
utf8 refactor(users/sterni/nix): move generic number operation into num 2023-08-09 12:12:47 +00:00