com-lihaoyi / scalatags

ScalaTags is a small XML/HTML construction library for Scala.
https://com-lihaoyi.github.io/scalatags/
MIT License
757 stars 117 forks source link

Escaping.validAttrName disallows a leading understore #280

Open malcolmredheron opened 4 months ago

malcolmredheron commented 4 months ago

The comment on Escaping.validAttrName says that an attribute can start with an underscore but startCharValid doesn't allow an underscore. I think that the fix is as simple as || sc == "_" but I'm submitting this as an issue rather than a PR because I haven't taken the time to make a fork, edit, build, run tests, etc. Sorry!

https://github.com/com-lihaoyi/scalatags/blob/f087694f2062767ad76f9b1032f4fe3dc3642a0e/scalatags/src/scalatags/Escaping.scala#L27