From c86d9555711fb0292725bacb05454b0166a99a71 Mon Sep 17 00:00:00 2001 From: z7zmey Date: Wed, 20 Mar 2019 21:21:18 +0200 Subject: [PATCH] #78 fix test --- printer/printer.go | 2 +- printer/printer_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/printer/printer.go b/printer/printer.go index c4912d8..e0c3f26 100644 --- a/printer/printer.go +++ b/printer/printer.go @@ -2429,6 +2429,7 @@ func (p *Printer) printStmtDo(n node.Node) { func (p *Printer) printStmtEcho(n node.Node) { nn := n.(*stmt.Echo) + if nn.GetFreeFloating().IsEmpty() { io.WriteString(p.w, "echo") } @@ -2436,7 +2437,6 @@ func (p *Printer) printStmtEcho(n node.Node) { io.WriteString(p.w, " ") } - p.printFreeFloating(nn, freefloating.Start) p.printFreeFloating(nn, freefloating.Echo) diff --git a/printer/printer_test.go b/printer/printer_test.go index ead3a37..1ee3c8d 100644 --- a/printer/printer_test.go +++ b/printer/printer_test.go @@ -3279,7 +3279,7 @@ func TestPrinterPrintStmtEchoHtmlState(t *testing.T) { }, }) - expected := `