fix(calculator): Dezimal-Eingabe nach ^ ermöglichen

Split-Regex für Dezimalpunkt-Check um ^ erweitern,
damit z.B. 2.3^1.5 korrekt eingegeben werden kann.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-16 21:56:29 +02:00
parent 10318008e6
commit f5cebd8d34
+1 -1
View File
@@ -462,7 +462,7 @@ const Calculator = {
case '.': { case '.': {
// Doppelten Dezimalpunkt im letzten Zahlenblock verhindern // Doppelten Dezimalpunkt im letzten Zahlenblock verhindern
const parts = this._currentExpr.split(/[+\-*/%()]/); const parts = this._currentExpr.split(/[+\-*/%()^]/);
const lastPart = parts[parts.length - 1]; const lastPart = parts[parts.length - 1];
if (lastPart && lastPart.includes('.')) break; if (lastPart && lastPart.includes('.')) break;
this._currentExpr += key; this._currentExpr += key;