mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
* Encoding.cpp (fromLaTeXCommand): fix bug when the string passed
to the method does not match any of the known unicode symbols. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27953 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3135ff4959
commit
df8bb4edcd
@ -23,6 +23,7 @@
|
||||
#include "support/debug.h"
|
||||
#include "support/FileName.h"
|
||||
#include "support/lstrings.h"
|
||||
#include "support/textutils.h"
|
||||
#include "support/unicode.h"
|
||||
|
||||
#include <boost/cstdint.hpp>
|
||||
@ -494,7 +495,9 @@ docstring Encodings::fromLaTeXCommand(docstring const & cmd, docstring & rem)
|
||||
|
||||
// If this is an exact match, we found a (longer)
|
||||
// matching command in the unicodesymbols file
|
||||
if (math == tmp || text == tmp) {
|
||||
if ((math == tmp || text == tmp)
|
||||
&& ((tmp.size() == 1 && !isAlphaASCII(tmp[0]))
|
||||
|| k == cmdend || !isAlphaASCII(cmd[k]))) {
|
||||
c = it->first;
|
||||
j = k - 1;
|
||||
i = j + 1;
|
||||
|
Loading…
Reference in New Issue
Block a user