Fix graph rendering of inequalities (#856)

* fix inequality rendering

* Add comment
This commit is contained in:
Pepe Rivera 2019-12-09 13:30:39 -08:00 committed by GitHub
parent 4bb5c39e34
commit f1bf3354c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -404,7 +404,14 @@ namespace GraphControl
wstring Equation::GetRequestHeader()
{
wstring expr{ Expression->Data() };
if (expr.find(L">=<") != wstring::npos)
// Check for unicode characters of less than, less than or equal to, greater than and greater than or equal to.
if (expr.find(L">&#x3E;<") != wstring::npos || expr.find(L">&#x3C;<") != wstring::npos || expr.find(L">&#x2265;<") != wstring::npos
|| expr.find(L">&#x2264;<") != wstring::npos)
{
return L"<mrow><mi>plotIneq2D</mi><mfenced separators=\"\">"s;
}
else if (expr.find(L">=<") != wstring::npos)
{
return L"<mrow><mi>plotEq2d</mi><mfenced separators=\"\">"s;
}