Microsoft/vscode

cursor placement of TSX tags does not work with some tailwind properties

Open

#225.807 aberto em 16 de ago. de 2024

Ver no GitHub
 (2 comments) (1 reaction) (1 assignee)TypeScript (10.221 forks)batch import
bughelp wantedjavascript

Métricas do repositório

Stars
 (74.848 stars)
Métricas de merge de PR
 (Mesclagem média 11h 43m) (1.000 fundiu PRs em 30d)

Description

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.92.2
  • OS Version: Ubuntu 24.04 LTS

When attempting to press enter, the editor usually auto indents the tag properly, but this does not happen when any property with the "/" charachter is included

Steps to Reproduce:

  1. copy and paste this code into a .tsx file
import React from "react";

const AuthDesktop = () => {
  return (
    <main className="w-full h-full flex items-center justify-center">
      <div className="w-1/2"></div>
      <div className="w-[50%]"></div>
    </main>
  );
};

export default AuthDesktop;
  1. attempt to press enter inside the tag with className w-[50%], it will place the cursor correctly, but that is not the case with the tag with className w-1/2

below is an example of what happens.

Screencast from 2024-08-16 22-06-02.webm

Guia do colaborador