angular / angular/components

bug(material/list): Whitespace before the content in list in v15

未关闭
#26,164 8 条评论 8 个 reaction 已指派 0 人 在 GitHub 查看
area: material/list P2 regression
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

### Is this a regression?

Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

v14

### Description

In your html template, if you break line, a blank space will render inside the content of your list item line.

### Actual Behavior

![image](https://user-images.githubusercontent.com/12090931/205303458-e4693251-797f-4c7b-aeb0-e6c675b2786a.png)

![image](https://user-images.githubusercontent.com/12090931/205303511-8a558b08-ebec-4812-b5f4-c9e030ab7856.png)

![image](https://user-images.githubusercontent.com/12090931/205303792-0cd975b4-57b9-434c-9a69-b19e4491c60b.png)

---------

#### This Works, but my prettier configuration doesn't allow it

![image](https://user-images.githubusercontent.com/12090931/205303609-bf6fadec-8f7b-4546-9670-21f8778e8b24.png)

![image](https://user-images.githubusercontent.com/12090931/205303647-5b755fb1-2e80-4d13-a3f7-0a4cc2f953ef.png)

![image](https://user-images.githubusercontent.com/12090931/205303718-76db51d2-af20-4bda-a03a-74ad84c3f90c.png)

### Environment

- Angular: v15
- CDK/Material: v15
- Browser(s): Chrome

贡献指南

打开贡献指南

调研方向

首先复现 issue 中的 Angular Material 列表示例:在 Angular v15 模板中将列表项的内容放到新的一行,并将渲染出的空白与 v14 进行比较。当换行不再产生不需要的前导空格,同时文档中的格式仍可使用时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
frontend
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。