{ lib, ... }: let # Escape XML special characters (e.g., <, >, &, etc.) escape = lib.escapeXML; # Indent each non-empty line of the given text by `level` using two spaces per level. indent = level: text: let indentation = lib.concatStrings (lib.genList (_: " ") level); # Two spaces per level lines = lib.splitString "\n" text; # Split text into lines indentedLines = map (line: if line == "" then "" else "${indentation}${line}") lines; in lib.concatStringsSep "\n" indentedLines; # Generate a