Microsoft/vscode
在 GitHub 查看cursor placement of TSX tags does not work with some tailwind properties
Open
#225,807 创建于 2024年8月16日
bughelp wantedjavascript
仓库指标
- Star
- (74,848 star)
- PR 合并指标
- (平均合并 11小时 43分钟) (30 天内合并 1,000 个 PR)
描述
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:
- copy and paste this code into a
.tsxfile
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;
- 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 classNamew-1/2
below is an example of what happens.