A few issues in HTML DSLs
Noticed these when running the Spork todo-mvc src.
Original
H.span
[ H.classes [ "todo-count" ] ]
[ H.strong [] [ H.text (show len) ]
, H.text item
]
Formatted
H.span [H.classes ["todo-count"]]
[ H.strong [] [H.text (show len)]
, H.text item
]
I would expect it to preserve the fact that it was on a newline. It's also a little unfortunate that in either case, the array values wouldn't align due to the "no spaces for single-line literals" rule. How does elm-format handle this?
Original
H.a
[ H.classes ("selected" <$ guard (v1 == v2))
, H.href (visibilityHref v1)
]
[ H.text (show v1) ]
Formatted
H.a
[ H.classes ("selected" <$ guard (v1 == v2))
, H.href (visibilityHref v1)
] [H.text (show v1)]
Also here, there is some dangling formatting here for the next expression.