Skip to content

Unexpected behavior for multiline template literals #96

@euge

Description

@euge

With the following code:

let data = `
  hello
  ${now}
  goodbye
`

an error is generated: Cannot read property 'sliceStart' of undefined. However when the interpolation portion is has a character in front and back, everything works as expected.

let data = `
  hello
  p${now}p
  goodbye
`

Is it expected behavior that template literals can't be the online thing on a single line?

Metadata

Metadata

Assignees

No one assigned

    Labels

    outdatedA closed issue/PR that is archived due to age. Recommended to make a new issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions