mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-21 23:09:40 +00:00
Be sure to insert a space after a macro when needed.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25088 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
66799e41fd
commit
69bd59cc8b
@ -17,6 +17,8 @@
|
||||
#include "Encoding.h"
|
||||
|
||||
#include "support/gettext.h"
|
||||
#include "support/lstrings.h"
|
||||
#include "support/textutils.h"
|
||||
|
||||
|
||||
namespace lyx {
|
||||
@ -127,6 +129,11 @@ void InsetMathString::write(WriteStream & os) const
|
||||
}
|
||||
os << command;
|
||||
}
|
||||
// We may need a space if the command contains a macro
|
||||
// and the last char is ASCII.
|
||||
if (lyx::support::contains(command, '\\')
|
||||
&& isAlphaASCII(command[command.size() - 1]))
|
||||
os.pendingSpace(true);
|
||||
} catch (EncodingException & e) {
|
||||
if (os.dryrun()) {
|
||||
// FIXME: this is OK for View->Source
|
||||
|
Loading…
x
Reference in New Issue
Block a user