slime-lang / phoenix_slime

Phoenix Template Engine for Slime
MIT License
310 stars 65 forks source link

Support a sigil for safe HTML #61

Closed the-mikedavis closed 5 years ago

the-mikedavis commented 5 years ago

EEx has a sigil for doing safe HTML in your Elixir code. At first look it doesn't seem to be too interesting, but with the new LiveView coming up, it looks pretty useful.

I hate writing Eex, love writing Slime. It'd be cool to be able to write slime in the live view, and it seems to me like a sigil for this is the first step in the right direction.

(Feature request)

doomspork commented 5 years ago

@the-mikedavis would you be open to taking a first stab at this? We'd welcome a PR 😁

the-mikedavis commented 5 years ago

@doomspork Sure thing. I have one nagging question, though. What should the sigil be? ~S is already used pretty commonly. Either we override ~S or we choose another character like L or H. What are your thoughts on this?

doomspork commented 5 years ago

That's a good question @the-mikedavis 🤔. @Rakoth do you have any preference? I'm leaning towards L.