Files
pricebuddy/tests/Fixtures/AutoCreateStore/unstructured-regex-thousands.html
Gordon HeydonandClaude Opus 5 cdf0a4c0aa fix: detect prices containing thousands separators in auto-create store
The fallback price regexes in auto_create_store_strategies matched only
bare digit runs, so a price formatted with a grouping separator was
mis-detected rather than skipped: against `>$3,924.80<` the anchored
pattern fails, then `~\$(\d+(\.\d{2})?)~` matches the leading `$3` and
AutoCreateStore stores a price of 3.0 — silently wrong, with no error to
tell the user the detected strategy is bad.

Allow commas inside the integer part of both patterns. CurrencyHelper::toFloat
already parses grouped values via the locale-aware Intl parser, so the
captured `3,924.80` resolves to 3924.80 without further changes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-29 10:48:50 +10:00

10 lines
161 B
HTML

<html>
<head>
<meta property="og:image" content="http://localhost/my-image.jpg">
</head>
<body>
<h1>My product</h1>
<p>$3,924.80</p>
</body>
</html>