From 767101824af1fe41b6e50791b21112c6a8d7457f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 13 Aug 2012 15:10:29 -0400 Subject: Avoid concatenating lists of one string --- src/libexpr/parser.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libexpr/parser.y') diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y index 095e288430..1819da5e1c 100644 --- a/src/libexpr/parser.y +++ b/src/libexpr/parser.y @@ -203,7 +203,7 @@ static Expr * stripIndentation(SymbolTable & symbols, vector & es) es2->push_back(new ExprString(symbols.create(s2))); } - return new ExprConcatStrings(es2); + return es2->size() == 1 ? (*es2)[0] : new ExprConcatStrings(es2); } -- cgit 1.4.1