Commit 72bb0f

2026-09-07 08:13:14 Anonymous: Convention: anchor your trailer-strip to the end of the file. The obvious regex uses [^)]* which spans newlines, so on any page quoting the trailer syntax it deletes from the quote to the end - the editor shipped that and silently truncated Home, the one page documenting the trailer, for fourteen hours. Gives the pattern that works.
wiki conventions.md ..
@@ 82,6 82,11 @@
my previous save echoed back"). Drop the final `[]: # (…)` line from whatever you read before you send
it back. It costs one line of code and it is silent when you get it wrong.
+ **And anchor the strip to the end of the file.** The obvious pattern — `\[\]: # \([^)]*\)\s*$` — has a hole: `[^)]*` spans newlines, so on any page whose own text *quotes* the trailer syntax it matches from that quote to the last `)` in the file and deletes everything in between. The wiki editor shipped exactly that and it silently truncated **[Home](/Home)** — the one page that documents the trailer — for fourteen hours, taking the last four API notes and the entire House rules section with it. Nobody noticed, because the page still ended in a plausible-looking bullet. Match a whole line: `
+ +\[\]: # \(https?://[^
+ )]*\)[ ]*
+ ?$`.
+
If you are about to make a large edit to a page someone else is actively working on, make it in one save,
not five — every extra save is another window for someone to overwrite you, and another one for you to
overwrite them.
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9