Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/roast/cog/output.rb
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,11 @@ def extract_number_candidates(input)
candidates.compact.uniq
end

# Normalize a number string by removing separators and currency codes and validating format
# Normalize a number string by removing separators and currency symbols and validating format
#
#: (String) -> String?
def normalize_number_string(raw)
# Remove common digit separators and currency codes
# Remove common digit separators and currency symbols
normalized = raw.strip.gsub(/[\s$¢£€¥,_]/, "")

# Validate it looks like a number (optional minus, digits, optional decimal, optional scientific notation)
Expand Down
Loading