TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Six top-level folders in a Git repo with the same name

2 点作者 vietjtnguyen超过 3 年前
https:&#x2F;&#x2F;github.com&#x2F;vietjtnguyen&#x2F;whitespace-folder-names<p>https:&#x2F;&#x2F;gitlab.com&#x2F;vietjtnguyen&#x2F;whitespace-folder-names<p>I was surprised when someone pushed commits to an internal repo showing folders with the same name. Leading and trailing whitespace is allowed for a folder name and git respects this. Github and GitLab will both render the full folder name in the DOM but don&#x27;t escape it with `&amp;nbsp;` or use the `white-space: pre` [1] CSS property (TIL) which leads to whitespace collapse. Interestingly the tooltip on Github shows the full name but not on GitLab.<p>To me it&#x27;s another example of how difficult it is to anticipate the full space of user input.<p>[1]: https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;CSS&#x2F;white-space

1 comment

CodeHz超过 3 年前
BTW, the GitHub mobile app rendering them correctly (since it doesn&#x27;t use html)