Skip to content

template literals and handling of missing semi-colons #676

@futtta

Description

@futtta

When normal JS vars are on separate lines with missing semi-colons, they are left on separate lines, but when using template literals the line-break is removed resulting in broken JS.

JS in;

// template literals without semicolons
var foo = `Hello`
foo = `world`

// template literals with semicolons
var foo = `Hello`;
foo = `world`;

// Simple strings without semicolons
var foo = 'Hello'
foo = 'world'

JS out:

var foo=`Hello`foo=`world`var foo=`Hello`;foo=`world`;var foo='Hello'
foo='world';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions