From ef65f0e1af6f510c083e49322ac87d3ba836fd9d Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Tue, 23 Dec 2008 12:49:42 +0000 Subject: [PATCH] Add clarifying comment. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27969 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Encoding.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Encoding.cpp b/src/Encoding.cpp index 69437bf2f5..c3f56e8986 100644 --- a/src/Encoding.cpp +++ b/src/Encoding.cpp @@ -494,7 +494,15 @@ docstring Encodings::fromLaTeXCommand(docstring const & cmd, docstring & rem) tmp.resize(tmp.size() - 1); // 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) && (tmp[0] != '\\' || (tmp.size() == 2 && !isAlphaASCII(tmp[1]))