Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

more agressive fixspaces

  • Loading branch information...
commit 0142b137d7a4a5af9dc1423825600b4d001496a2 1 parent 3e4dcf7
@dougma dougma authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 resolvers/local/library.cpp
View
4 resolvers/local/library.cpp
@@ -539,7 +539,7 @@ Library::get_field(string table, int id, string field)
}
-// replace whitespace with ' ' and replace multiple whitespace with single
+// replace whitespace and other control codes with ' ' and replace multiple spaces with single
static
string
fixspaces(const string& s)
@@ -548,7 +548,7 @@ fixspaces(const string& s)
bool prevWasSpace = false;
r.reserve(s.length());
for (string::const_iterator i = s.begin(); i != s.end(); i++) {
- if (*i > 0 && isspace(*i)) {
+ if (*i > 0 && *i <= ' ') {
if (!prevWasSpace) {
r += ' ';
prevWasSpace = true;
Please sign in to comment.
Something went wrong with that request. Please try again.