Remove LRE/LRO characters from results and error messages (#1161)

* Remove LRE/LRO characters and rely on Xaml to correctly displayed the numbers and error messages RtL

* unit tests
This commit is contained in:
Rudy Huyn
2020-04-30 12:04:33 -07:00
committed by GitHub
parent 2cafb0dc88
commit 6e521d8f29
20 changed files with 127 additions and 188 deletions

View File

@@ -45,12 +45,7 @@ unsigned int CalculatorHistory::AddToHistory(
spHistoryItem->historyItemVector.spTokens = tokens;
spHistoryItem->historyItemVector.spCommands = commands;
// to be changed when pszexp is back
wstring generatedExpression = GetGeneratedExpression(*tokens);
// Prefixing and suffixing the special Unicode markers to ensure that the expression
// in the history doesn't get broken for RTL languages
spHistoryItem->historyItemVector.expression = L'\u202d' + generatedExpression + L'\u202c';
spHistoryItem->historyItemVector.expression = GetGeneratedExpression(*tokens);
spHistoryItem->historyItemVector.result = wstring(result);
return AddItem(spHistoryItem);
}