render-rs / render.rs

🔏 A safe and simple template engine with the ergonomics of JSX
https://docs.rs/render
MIT License
238 stars 23 forks source link

Fixes to the way Render handles attributes #45

Open theashguy opened 3 years ago

theashguy commented 3 years ago

Prior to this PR Render could only handle attributes without any punctuation in them OR hyphenated attributes. There are however a range of weird and wonderful attributes inside SVG and that various Javascript libraries use that require other types of punctuation OR multiple instances of punctuation in an attribute.

This PR improves the state of this (though I believe there are still some holes in how it works-- eg, I'm not sure it works if attributes begin with punctuation).

Additionally, it opens up the ability for attribute content to have special characters in it-- a requirement if you want to pre-load some data into a JS script for instance as a json object.

theashguy commented 3 years ago

Have added my notes for review. @Schniz @vpzomtrrfrt @Tarnadas