-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArabicFixer messes with angle brackets and quotes around {0} format placeholders #36
Comments
Hello , do you know any solution to Brackets ? |
@mostafayahia2020 I'd try keeping your Arabic text separate from your math: var math = "x*(x+y)";
var result = string.Format(FixArabic("فتح {0}"), math); // my function If you're not putting quotes or anything funny around your format characters, then you may not need my function. Just make sure you don't use hindu numbers. |
I am sorry but i don't know how to use your class or your function inside the scripts |
Sorry, I used Format wrong. It's supposed to be string.Format: var math = "x*(x+y)";
var fmt = FixArabic("فتح {0}"); // my function
var result = string.Format(fmt, math); |
I have text that contains
{0}
to allow translations to position words within the translated phrase.ArabicFixer messes with angle brackets and quotes around my
{0}
which breaks the formatting. (Causing a FormatException.)It looks like the IsPunctuation checks should prevent this, but maybe those are only to prevent character replacement of punctuation and not to prevent right-to-left conversion?
My workaround is to strip out some of these brackets and quotes. Here's my tests and my FixArabic function.
The text was updated successfully, but these errors were encountered: