[object Object]

← back to Rentv 2026

harden(news-dedup): Cody gate — word-boundary the single-char units (b/m/k) so '$985,000 Multifamily' / '$1,000 Monthly' don't capture the next word's first letter as a unit (the false 'm' had made '$1,000 monthly' sign identical to '$1 billion'). Full-word units unchanged

b83fd44b74ca88f4e5a45fc0fdb088404fa6d556 · 2026-08-06 10:29:33 -0700 · Steve

Files touched

Diff

commit b83fd44b74ca88f4e5a45fc0fdb088404fa6d556
Author: Steve <steve@designerwallcoverings.com>
Date:   Thu Aug 6 10:29:33 2026 -0700

    harden(news-dedup): Cody gate — word-boundary the single-char units (b/m/k) so '$985,000 Multifamily' / '$1,000 Monthly' don't capture the next word's first letter as a unit (the false 'm' had made '$1,000 monthly' sign identical to '$1 billion'). Full-word units unchanged
---
 server.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/server.js b/server.js
index b615ebd7..93441307 100644
--- a/server.js
+++ b/server.js
@@ -1230,7 +1230,9 @@ const NEWS_STOP = new Set(('the a an of for to in on at and or with from into bu
   + 'avenue street road boulevard drive court place plaza tower towers sales').split(/\s+/).filter(Boolean));
 function newsSig(title) {
   const t = String(title || '').toLowerCase();
-  const money = t.match(/\$\s?([\d,.]+)\s?(billion|bil|b|million|mil|m|k)?/);
+  // \b on the single-char units so "$985,000 Multifamily"/"$1,000 Monthly"/"$500 Building" don't capture
+  // the m/b of the next word as a unit (that skipped raw-dollar scaling → "$1,000 monthly" signed == "$1B").
+  const money = t.match(/\$\s?([\d,.]+)\s?(billion|bil|b\b|million|mil|m\b|k\b)?/);
   let m = '';
   // Normalize EVERY amount to the same base unit = MILLIONS: billion ×1000, million ×1, k(thousand) ÷1000.
   // So $100k→0.1, $100M→100, $100B→100000 — all on one scale. Do NOT "fix" `u==='k'` to *=1000: that

← 6b792cc9 PR CRM: user-authored notes on any entity (org/broker/person  ·  back to Rentv 2026  ·  nav: surface /market-pulse (charts) in map hamburger + site- ce079996 →