From fd3fd337b90ee34fb3cb93a0ed5dd3b8a138c9f1 Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Mon, 26 May 2025 16:27:50 +0200 Subject: [PATCH] Prices must be on one line --- fin_defs/parse_price.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fin_defs/parse_price.py b/fin_defs/parse_price.py index 69e7d35..aa7e712 100644 --- a/fin_defs/parse_price.py +++ b/fin_defs/parse_price.py @@ -84,7 +84,7 @@ def parse_price(text: str, default_currency: Asset) -> AssetAmount | None: """ if isinstance(text, AssetAmount): return text - text = str(text).lower().strip() + text = str(text).lower().replace('\n', ' ').replace('\t', ' ').strip() if text == 'free': return AssetAmount(default_currency, Decimal(0))