forked from jasder/antlr
rollback and do a real fix for whitespace escaping
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9911]
This commit is contained in:
parent
7498908d62
commit
09da63cfd4
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue