Take into account that '\' is always part of a LaTeX command and also

that entries in the unicodesymbols file may not start with '\'.
Maybe the method should be renamed as fromLaTeXCode?


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27957 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2008-12-23 02:03:53 +00:00
parent 030e249d91
commit 98114f5a82

View File

@ -496,8 +496,9 @@ docstring Encodings::fromLaTeXCommand(docstring const & cmd, docstring & rem)
// If this is an exact match, we found a (longer) // If this is an exact match, we found a (longer)
// matching command in the unicodesymbols file // matching command in the unicodesymbols file
if ((math == tmp || text == tmp) if ((math == tmp || text == tmp)
&& ((tmp.size() == 1 && !isAlphaASCII(tmp[0])) && (tmp[0] != '\\'
|| k == cmdend || !isAlphaASCII(cmd[k]))) { || (tmp.size() == 2 && !isAlphaASCII(tmp[1]))
|| k == cmdend || !isAlphaASCII(cmd[k]))) {
c = it->first; c = it->first;
j = k - 1; j = k - 1;
i = j + 1; i = j + 1;