Add clarifying comment.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27969 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2008-12-23 12:49:42 +00:00
parent 852c5178de
commit ef65f0e1af

View File

@ -494,7 +494,15 @@ docstring Encodings::fromLaTeXCommand(docstring const & cmd, docstring & rem)
tmp.resize(tmp.size() - 1); tmp.resize(tmp.size() - 1);
// 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 entry in the unicodesymbols file.
// If the entry doesn't start with '\', we take note
// of the match and continue (this is not a ultimate
// acceptance, as some other entry may match a longer
// portion of the cmd string). However, if the entry
// does start with '\', we accept the match only if
// this is a valid macro, i.e., either it is a single
// (nonletter) char macro, or nothing else follows,
// or what follows is a nonletter char.
if ((math == tmp || text == tmp) if ((math == tmp || text == tmp)
&& (tmp[0] != '\\' && (tmp[0] != '\\'
|| (tmp.size() == 2 && !isAlphaASCII(tmp[1])) || (tmp.size() == 2 && !isAlphaASCII(tmp[1]))