mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 05:33:33 +00:00
fixed two consecutive spaces handling
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1948 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c6e14e1536
commit
2a3b89c6f1
@ -1,3 +1,7 @@
|
||||
2001-04-24 Allan Rae <rae@lyx.org>
|
||||
|
||||
* xforms_helpers.C (formatted): two consecutive spaces would kill it.
|
||||
|
||||
2001-04-20 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* xforms_helpers.C (formatted): do not use string::substr(1) on a
|
||||
|
@ -50,8 +50,10 @@ string formatted(string const & sin, int w, int size, int style)
|
||||
for (string::const_iterator sit = sin.begin();
|
||||
sit != sin.end(); ++sit) {
|
||||
if ((*sit) == ' ' || (*sit) == '\n') {
|
||||
sentence.push_back(word);
|
||||
word.erase();
|
||||
if (!word.empty()) {
|
||||
sentence.push_back(word);
|
||||
word.erase();
|
||||
}
|
||||
if ((*sit) == '\n') word += '\n';
|
||||
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user