diff options
-rw-r--r-- | bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AbstractCSSSourceFormatter.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AbstractCSSSourceFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AbstractCSSSourceFormatter.java index 4bd509dc0f..29f4ab1c1e 100644 --- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AbstractCSSSourceFormatter.java +++ b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AbstractCSSSourceFormatter.java @@ -253,8 +253,11 @@ public abstract class AbstractCSSSourceFormatter implements CSSSourceGenerator { return; } } - if (!(source.length() > 0 && source.toString().charAt(source.length()-1) == ' ')) - source.append(" ");//$NON-NLS-1$ + //bug412395 + //just verify if the source and the toAppend strings do not end with a whitespace to avoid the whitespace duplication. + if (!(source.length() > 0 && source.toString().charAt(source.length()-1) == ' ') && !(toAppend.length() > 0 && toAppend.charAt(toAppend.length()-1) == ' ')){ + source.append(" ");//$NON-NLS-1$ + } } /** |