rollback and do a real fix for whitespace escaping

[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9911]
This commit is contained in:
parrt 2012-01-27 12:00:30 -08:00
parent 7498908d62
commit 09da63cfd4
2 changed files with 7 additions and 2 deletions

View File

@ -35,6 +35,7 @@ import org.abego.treelayout.TreeForTreeLayout;
import org.abego.treelayout.TreeLayout;
import org.abego.treelayout.util.DefaultConfiguration;
import org.antlr.v4.runtime.Parser;
import org.antlr.v4.runtime.misc.Utils;
import org.antlr.v4.runtime.tree.ParseTree;
import org.antlr.v4.runtime.tree.Tree;
@ -152,7 +153,9 @@ public class TreePostScriptGenerator {
}
protected String getText(Tree tree) {
return treeTextProvider.getText(tree);
String s = treeTextProvider.getText(tree);
s = Utils.escapeWhitespace(s, false);
return s;
}
public TreeTextProvider getTreeTextProvider() {

View File

@ -347,7 +347,9 @@ public class TreeViewer extends JComponent {
}
protected String getText(Tree tree) {
return treeTextProvider.getText(tree);
String s = treeTextProvider.getText(tree);
s = Utils.escapeWhitespace(s, true);
return s;
}
public TreeTextProvider getTreeTextProvider() {