Molodetz blogrol volgens DPP-template

This commit is contained in:
2026-10-05 09:36:20 +02:00
commit f290a4c766
277 changed files with 15758 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
# retoor <retoor@molodetz.nl>
import re
BLANK_LINES = re.compile(r"\n[ \t]*\n(?:[ \t]*\n)+")
TRAILING = re.compile(r"[ \t]+\n")
def reformat_html(text):
if "<pre" in text or "<textarea" in text:
return TRAILING.sub("\n", text)
text = TRAILING.sub("\n", text)
return BLANK_LINES.sub("\n\n", text)