mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Properly fix #9616
Now all symbols in the unicodesymbols file having a mathcommand are not wrapped in a \text inset anymore.
This commit is contained in:
parent
648df224c7
commit
506324ef9d
@ -714,10 +714,4 @@ bool createInsetMath_fromDialogStr(docstring const & str, MathData & ar)
|
||||
}
|
||||
|
||||
|
||||
bool isAsciiOrMathAlpha(char_type c)
|
||||
{
|
||||
return isASCII(c) || Encodings::isMathAlpha(c);
|
||||
}
|
||||
|
||||
|
||||
} // namespace lyx
|
||||
|
@ -33,11 +33,6 @@ MathAtom createInsetMath(char const * const, Buffer * buf);
|
||||
*/
|
||||
bool createInsetMath_fromDialogStr(docstring const &, MathData &);
|
||||
|
||||
/** Tells whether the argument is an ascii character or is marked as
|
||||
* mathalpha in the unicodesymbols file.
|
||||
*/
|
||||
bool isAsciiOrMathAlpha(char_type);
|
||||
|
||||
typedef std::map<docstring, latexkeys> MathWordList;
|
||||
MathWordList const & mathedWordList();
|
||||
|
||||
|
@ -1017,7 +1017,7 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
|
||||
|
||||
else if (t.cat() == catOther) {
|
||||
char_type c = t.character();
|
||||
if (isAsciiOrMathAlpha(c)
|
||||
if (!Encodings::isUnicodeTextOnly(c)
|
||||
|| mode_ & Parse::VERBATIM
|
||||
|| !(mode_ & Parse::USETEXT)
|
||||
|| mode == InsetMath::TEXT_MODE) {
|
||||
@ -1026,7 +1026,7 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
|
||||
MathAtom at = createInsetMath("text", buf);
|
||||
at.nucleus()->cell(0).push_back(MathAtom(new InsetMathChar(c)));
|
||||
while (nextToken().cat() == catOther
|
||||
&& !isAsciiOrMathAlpha(nextToken().character())) {
|
||||
&& Encodings::isUnicodeTextOnly(nextToken().character())) {
|
||||
c = getToken().character();
|
||||
at.nucleus()->cell(0).push_back(MathAtom(new InsetMathChar(c)));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user