mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Fix display of single-char macro names
Essentially, all characters are allowed in single-char macro names. Part of #11158.
This commit is contained in:
parent
358626b735
commit
95bc273a59
@ -800,11 +800,13 @@ bool InsetMathMacro::validName() const
|
|||||||
return false;*/
|
return false;*/
|
||||||
|
|
||||||
// valid characters?
|
// valid characters?
|
||||||
for (size_t i = 0; i<n.size(); ++i) {
|
if (n.size() > 1) {
|
||||||
if (!(n[i] >= 'a' && n[i] <= 'z')
|
for (size_t i = 0; i<n.size(); ++i) {
|
||||||
&& !(n[i] >= 'A' && n[i] <= 'Z')
|
if (!(n[i] >= 'a' && n[i] <= 'z')
|
||||||
&& n[i] != '*')
|
&& !(n[i] >= 'A' && n[i] <= 'Z')
|
||||||
return false;
|
&& n[i] != '*')
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -1292,11 +1292,13 @@ bool InsetMathMacroTemplate::validName() const
|
|||||||
return false;*/
|
return false;*/
|
||||||
|
|
||||||
// valid characters?
|
// valid characters?
|
||||||
for (size_t i = 0; i < n.size(); ++i) {
|
if (n.size() > 1) {
|
||||||
if (!(n[i] >= 'a' && n[i] <= 'z')
|
for (size_t i = 0; i < n.size(); ++i) {
|
||||||
&& !(n[i] >= 'A' && n[i] <= 'Z')
|
if (!(n[i] >= 'a' && n[i] <= 'z')
|
||||||
&& n[i] != '*')
|
&& !(n[i] >= 'A' && n[i] <= 'Z')
|
||||||
return false;
|
&& n[i] != '*')
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user