From 50d29eea3794f7b2fba7ad41e13d41199302f47c Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Fri, 28 Nov 2025 23:40:28 -0700 Subject: [PATCH] Add # before unit number if it isn't prefixed with anything --- src/addressfunctions.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/addressfunctions.py b/src/addressfunctions.py index 214d97a..7cddefc 100644 --- a/src/addressfunctions.py +++ b/src/addressfunctions.py @@ -367,7 +367,11 @@ def normalizeAddress(number, street, unit, city, state, zipcode, lat, lon, zippr #if not src.config.appendPlus4: # plus4 = "" - + + if unit and not unitprefix and re.match(r"^[A-Z0-9]+$", unit): + # Put a # before the unit number if it's by itself + unitprefix = "#" + return { "number": number, "street": streetonly,