String Templates Formatting for """ Multi-Line is "not nice"
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
從 web/ui/src/main/java/dev/enola/web/ui/ThingUI.java 中的多行 string-template 範例開始,檢視 #981 引入的 JEP-430 支援。追蹤多行模板的 formatter 行為,接著新增一個回歸測試,展示所需的插值配置,並驗證格式化後的輸出。
由索引模型根據 Issue 內容生成。
描述
#981 introduced JEP-430 / JEP-459 String Templates support.
This works great (~leaves it alone) for "single line", e.g. var html = STR."<table class=\"\{cssClass}\">";
However when exploring using this for """ Multi-Line it currently formats like this:
return STR."""
<table class="\{
s(cssClass)}">
<tbody>
</tbody>
</table>
""";
To my eyes, that line break (as if it was a Builder type thing, presumably?) looks fairly "ugly"; I would expect it to simply look like this instead:
return STR."""
<table class="\{s(cssClass)}">
<tbody>
</tbody>
</table>
""";
Do folks agree?
@cushon
- 主要語言
- Java
- 星號
- 6.2k
- 分支
- 940
- 平均合併
- 7 小時 46 分鐘
- 30 天內合併 PR
- 11
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
google/google-java-format 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
google/google-java-format#1094 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 35/100
google/google-java-format#1470 · 5 個 reaction ·
維護者通常 1 天內回覆
-
IndexOutOfBoundsException - Wrong formatted content when dealing with latex String可能重新可做 @Amlan2000 於 61 天前認領,目前沒有進行中的 PR。 未關閉
難度 4/5 3-5 天 新手友好度 55/100
google/google-java-format#1439 · 1 則留言 ·
維護者通常 1 天內回覆
-
unused import removal leaves extra blank line between package declaration and class Javadoc / declaration可能已有人在做 @arimu1 於 70 天前認領。 未關閉
難度 3/5 1-2 天 新手友好度 62/100
google/google-java-format#1436 · 2 則留言 ·
維護者通常 1 天內回覆
-
Eclipse
難度 3/5 1-2 天 新手友好度 48/100
google/google-java-format#1428 · 4 則留言 ·
維護者通常 1 天內回覆
查看 google/google-java-format 的全部 Issue
相似的 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 62/100
MCModderAnchor/TACZ#758 ·
-
agent-java community triage
難度 2/5 1-3 小時 新手友好度 72/100
elastic/apm-agent-java#4594 ·
維護者通常 1 天內回覆
-
area/plugin good first issue
難度 2/5 1-3 小時 新手友好度 85/100
kestra-io/plugin-soda#137 ·
-
area/plugin good first issue
難度 2/5 1-3 小時 新手友好度 82/100
kestra-io/plugin-aws#816 ·
維護者通常 2 天內回覆
-
area/plugin good first issue
難度 2/5 1-3 小時 新手友好度 88/100
kestra-io/plugin-kestra#200 ·
維護者通常 1 天內回覆