Comment 27191 on #1543, correction 27192. Candidate afb2ae0e. Co-Authored-By: Claude Opus 5.5 <[email protected]>
14 lines
641 B
Diff
14 lines
641 B
Diff
diff --git a/packages/webui/src/reads.mjs b/packages/webui/src/reads.mjs
|
|
index 01224d15..a0c03c51 100644
|
|
--- a/packages/webui/src/reads.mjs
|
|
+++ b/packages/webui/src/reads.mjs
|
|
@@ -44,7 +44,7 @@ export function redactor({ configDir = null, dataRoot = null } = {}) {
|
|
.map(([p, label]) => [new RegExp(`${escape(p.replace(/\/+$/, ''))}(?![\\w.-])`, 'g'), label]);
|
|
return text => {
|
|
let s = unquote(String(text));
|
|
- for (const [re, label] of known) s = s.replace(re, label);
|
|
+
|
|
return s.replace(/(^|[\s('"`=,[{<]|:(?!\/\/[^/]))~?\/[^\s'"`),;\]}>]+/g, '$1<path>').replace(/(?<![\w.-])\d{17,20}(?![\w.-])/g, '<id>');
|
|
};
|
|
}
|