nau / jscala

Scala macro that produces JavaScript from Scala code.
MIT License
205 stars 25 forks source link

Escape strings #8

Closed mattpap closed 11 years ago

mattpap commented 11 years ago

Currently:

javascript {
    val attribution = """&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors"""
}

and

javascript {
    val attribution = "&copy; <a href=\"http://osm.org/copyright\">OpenStreetMap</a> contributors"
}

gives:

var attribution = "&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors";
nau commented 11 years ago

Nice one :)