summaryrefslogtreecommitdiffstats
path: root/src/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 0ae6fa2..67c7c03 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1537,8 +1537,12 @@ QCString removeRedundantWhiteSpace(const QCString &s)
{
nextChar:
char c=s.at(i);
- if (csp<6 && c==constScope[csp]) csp++; else csp=0;
- if (vsp<8 && c==virtualScope[vsp]) vsp++; else vsp=0;
+ if ((csp==0 && (i==0 || !isId(constScope[i-1])) && csp<6) &&
+ c==constScope[csp]
+ ) csp++; else csp=0;
+ if ((vsp==0 && (i==0 || !isId(virtualScope[i-1])) && vsp<8) &&
+ c==virtualScope[vsp]
+ ) vsp++; else vsp=0;
if (c=='"') // quoted string
{
i++;