aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjturtle <jturtl@pm.me> 2023-10-20 01:05:00 +0000
committerThomas Voss <mail@thomasvoss.com> 2023-10-20 20:24:14 +0200
commitd3e5212ece837168aca1ee485dd6cb0251b5b3d5 (patch)
tree648a44d9a1b4a7b69b2c024195298d7ccd2f73be
parent10d7c513c47441f9260946ecc4ccc80cdbb966d9 (diff)
Fix printing classes and attrsv1.0.2
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.
-rw-r--r--formatter/formatter.go2
1 files changed, 1 insertions, 1 deletions
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("=\"")