jdavisclark / JsFormat

Javascript formatting for Sublime Text 2 & 3
1.42k stars 222 forks source link

Preserve ${ on ES6 #157

Closed GuilhermeReda closed 6 years ago

GuilhermeReda commented 8 years ago

Hi, I have a file with the following code.

`SELECT
  nextval('${this.options.schema ? `${this.options.schema}.` : ''}"${this.tableName}_${this.autoIncrementField}_seq"'::regclass
) nextval;`

When I format the file, that line becomes

`SELECT
  nextval('${this.options.schema ? `
  $ {
    this.options.schema
  }.
  ` : ''}"${this.tableName}_${this.autoIncrementField}_seq"'::regclass
) nextval;`

it is putting a space between $ and {, and that breaks my code.

jdavisclark commented 6 years ago

this does not appear to be happening anymore. re-open if necessary. I think you may have had some errant backticks in your example as well, but I'm not sure.