Closed ivanceras closed 3 months ago
I think this could be easier if done using the same way javascript allow type to be accessed using a camel-case on the identifier that has a dash.
example: z-index
could be accessed in javascript using zIndex.
so stroke-width=5
will become strokeWidth=5
.
This is similar to https://github.com/chinedufn/percy/issues/106#issuecomment-474647127 where the parser currently assumes that all attributes are composed of a single identifier.
Note the single input.parse()
here.
The solution is peeking for a -
and if there is one parsing two more identifiers, concatenating their to_string
's and then creating a new identifier using that new String.
As with https://github.com/chinedufn/percy/issues/106#issuecomment-474647127 we'd want a test for this.
I can take a look next time I'm working on the parser. If you'd like to take a look in the meantime I'd be happy to provide more detailed instructions.
Cheers and thanks for opening the issue!!
Hi, any chance of raising the priority of this issue as its a showstopper for Accessibility aria- and bootstrap data- attributes. Thanks
as well for http-equiv
in meta
tags
Implemented https://github.com/chinedufn/percy/pull/199
Available in html-macro = 0.2.3
In this example, how is
stroke-width=5
treated? The parser complains about this.