From d3e5212ece837168aca1ee485dd6cb0251b5b3d5 Mon Sep 17 00:00:00 2001 From: jturtle Date: Fri, 20 Oct 2023 01:05:00 +0000 Subject: Fix printing classes and attrs Well well well, here we are again. Iterate over the `nClasses` list instead of every attr after printing the classes. With all due respect, you should consider writing a test suite to catch silly errors like this. --- formatter/formatter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/formatter/formatter.go b/formatter/formatter.go index b8ec85f..f5d7517 100644 --- a/formatter/formatter.go +++ b/formatter/formatter.go @@ -70,7 +70,7 @@ func printAttrs(attrs []parser.Attr) { } } - for _, a := range attrs { + for _, a := range nClasses { fmt.Printf(" %s", a.Key) if a.Value != "" { fmt.Print("=\"") -- cgit v1.2.3