krasimir / absurd

A JavaScript library with superpowers
http://absurdjs.krasimirtsonev.com/
MIT License
1.38k stars 90 forks source link

Replacing \n with empty string may be less error prone #126

Closed tonylampada closed 8 years ago

tonylampada commented 8 years ago

I'm using this snippet for creating SQL queries (I understand the security issues, and it's ok in my case). For the SQL use case, concatenating multiple lines can generate invalid statements like select *from mytable I can also imagine a case with html where this can lead to problems like <inputtype="text"> So it's probably better to assume that some kind of empty space is needed.

krasimir commented 8 years ago

The resulted code variable is anyway sent to the Function prototype so I think it's safe to contain intervals instead of just empty string. Merging.

krasimir commented 8 years ago

0.3.6 is released.