2

I am really new to sweet.js.

I would love to have multiline strings in javascript just like in EcmaScript 6:

var htmlString = `Say hello to 
multi-line
strings!`;

Is it possible to formulate a sweetjs macro handling that (and how ??) ?

Furthermore, would it be possible to do String Interpolation/Templating using that macro just like ES6 does ?

lgersman
  • 2,178
  • 2
  • 19
  • 21

1 Answers1

3

There's an example at the bottom of this issue on the GitHub project that uses backticks.

mqsoh
  • 3,180
  • 2
  • 24
  • 26