From 249fae33b10d551e26a75d9955869e51420b8af8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Kijewski?= Date: Fri, 7 Jan 2022 19:37:37 +0100 Subject: [PATCH 1/2] Add whitespace stripping in the input In HTML sources indentation can aid readability, but it only bloats the output. This PR adds the argument "strip" to templates, which lets you automatically strip the template input: * "none": Don't strip any spaces in the input * "tail": Remove a single single newline at the end of the input. This is the default * "trim-lines": Remove all whitespaces at the front and back of all lines, and remove empty lines * "eager": Like "trim", but also replace runs of whitespaces with a single space. The automatic stripping does not try to understand the input at all. It does not know what `xml:space="preserve"`, `
` or `