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

Can't wrap JSX in { } #1168

Open
tien opened this issue Jul 22, 2023 · 1 comment
Open

Can't wrap JSX in { } #1168

tien opened this issue Jul 22, 2023 · 1 comment

Comments

@tien
Copy link

tien commented Jul 22, 2023

Expected behavior

// Be able to select the inner div and wrap it in  {}
<div>
  <div />
</div>

// Which will become
<div>
  {<div />}
</div>

// This is useful when doing something like this
<div>
  {somePredicate && <div />}
</div>

Actual behavior

Receive the following error

mismatch sexp state: wrapping would break structure

Environment & version information

  • smartparens version:
  • Active major-mode: typescript-tsx-mode
  • Smartparens strict mode: nil
  • Emacs version (M-x emacs-version): GNU Emacs 28.2 (build 1, aarch64-apple-darwin21.1.0, NS appkit-2113.00 Version 12.0.1 (Build 21A559)) of 2023-02-23
  • Starterkit/Distribution: Doom
  • OS: darwin
@Fuco1
Copy link
Owner

Fuco1 commented Nov 2, 2023

Where does the typescript-tsx-mode come from? I'm using the regular typescript-mode and it wraps.

@Fuco1 Fuco1 added this to Triage Mar 18, 2024
@Fuco1 Fuco1 moved this to To triage in Triage Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To triage
Development

No branches or pull requests

2 participants