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

JSX/TSX expansion reverts to class instead of className when using multiplication operator #550

Open
tatethurston opened this issue Mar 31, 2023 · 1 comment

Comments

@tatethurston
Copy link

Reproduction:

.vimrc:

Plug 'mattn/emmet-vim', { 'for': ['html', 'javascriptreact', 'typescriptreact'] }
autocmd BufNewFile,BufRead *.tsx set filetype=typescriptreact
autocmd BufNewFile,BufRead *.jsx set filetype=javascriptreact

foo.tsx:

.foo>.bar*5

results in

<div class="foo">
  <div class="bar"></div>
  <div class="bar"></div>
  <div class="bar"></div>
  <div class="bar"></div>
  <div class="bar"></div>
</div>

Expected:

<div className="foo">
  <div className="bar"></div>
  <div className="bar"></div>
  <div className="bar"></div>
  <div className="bar"></div>
  <div className="bar"></div>
</div>

When not using the multiplication operator, the correct expansion is observed:

.foo>.bar

results in

  <div className="foo">
    <div className="bar"></div>
  </div>
@tatethurston
Copy link
Author

tatethurston commented Mar 31, 2023

Possibly related: #516

https://github.com/mattn/emmet-vim/blob/master/autoload/emmet.vim#L2075-L2092

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

1 participant