Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace template string with xxx when formatting #83

Open
lsby opened this issue Oct 17, 2020 · 5 comments
Open

Replace template string with xxx when formatting #83

lsby opened this issue Oct 17, 2020 · 5 comments

Comments

@lsby
Copy link

lsby commented Oct 17, 2020

1 Write code:

function f(opt) {
    return  html`
        <div id=${opt.id} style="display: grid; width: ${opt.width}; height: ${opt.height}; grid-template-rows: ${opt.row.join(' ')}; grid-template-columns: ${opt.col.join(' ')}">
    `
}

2 Format code
3 get:

function f(opt) {
    return html`
        <div id=${opt.id}
            style="display: grid; width: xxxxxxxxxxxx; height: xxxxxxxxxxxxx; grid-template-rows: xxxxxxxxxxxxxxxxxxxx; grid-template-columns: xxxxxxxxxxxxxxxxxxxx">
    `
}

Seems to be triggered by the style tag.

@borismus
Copy link

Can confirm I'm seeing the same thing.

style="${styleMap({transform})}" is transformed into style="xxxxxxxxxxxxxxxxxxxxxxxx" on save (probably due to auto-format).

@arafath-mk
Copy link

Getting this issue while doing auto-formatting. Due to this issue, I had to disable this extension in the VS Code. Can you please consider this as a severe issue?

@KChavdarov
Copy link

I am experiencing the same issue, which seems to be triggered by the built in VSC formatter. Changed the default formatter to Beautify and the issue disappears.

@Vac1911
Copy link

Vac1911 commented Jun 23, 2021

Same thing here

@IliaIdakiev
Copy link

Same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants