summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpelder2006-04-11 14:45:23 (EDT)
committer pelder2006-04-11 14:45:23 (EDT)
commit9e963abfa4466522e62b5aa248e4969c6ca36cf4 (patch)
tree4287980accaf9554e64adc0475da2071c1a9fa4c
parentd4fd08ef7ef4ed0ec4b0ffb5e35ec78084c4dc77 (diff)
downloadorg.eclipse.jet-9e963abfa4466522e62b5aa248e4969c6ca36cf4.zip
org.eclipse.jet-9e963abfa4466522e62b5aa248e4969c6ca36cf4.tar.gz
org.eclipse.jet-9e963abfa4466522e62b5aa248e4969c6ca36cf4.tar.bz2
[136161] Confirm that a text element has a preceding NL before stripping a line that is all whitespace, and has no terminator (because there is another element following it on a line).
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/compiler/TextTrimmingVisitor.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/compiler/TextTrimmingVisitor.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/compiler/TextTrimmingVisitor.java
index 6c83df8..a6dd34b 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/compiler/TextTrimmingVisitor.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/compiler/TextTrimmingVisitor.java
@@ -103,7 +103,7 @@ class TextTrimmingVisitor extends DefaultJET2ASTVisitor implements JET2ASTVisito
// last line has a delimiter => this element start on col # 1
return true;
}
- else if(new String(text.getRawText(), line.getStart(), line.getEnd() - line.getStart()).trim().length() == 0)
+ else if( lines.length > 1 && new String(text.getRawText(), line.getStart(), line.getEnd() - line.getStart()).trim().length() == 0)
{
// last line is all whitespace
return true;