Open st33d opened 3 years ago
I had to write a script in order to get around the fixer trashing rich text formatting.
Consider the following input:
<size=82%><color=#1FBEFF>أنقاض</color></size>
public static string FormatArabic(string input) { bool inside = true; string inner = ""; string output = ""; for(int i = 0; i < input.Length; i++) { var c = input[i]; switch(c) { case '<': inside = false; output += ArabicSupport.ArabicFixer.Fix(inner, false, false); inner = ""; goto default; case '>': inside = true; output += c; break; default: if(inside == false) output += c; else inner += c; break; } } return output; }
This appears to solve my problem. Whilst this is trivial to write, a lot of StackOverflow posts would recommend Regex instead.
It would be nice if the fixer supported this by default in some way.
I had to write a script in order to get around the fixer trashing rich text formatting.
Consider the following input:
<size=82%><color=#1FBEFF>أنقاض</color></size>
This appears to solve my problem. Whilst this is trivial to write, a lot of StackOverflow posts would recommend Regex instead.
It would be nice if the fixer supported this by default in some way.