GitHub 根据什么决定在 README.md 文件中应用颜色的方式和位置?
Based on what does GitHub decide how and where to apply colors within the README.md file?
我一直试图通过观察 public 存储库上的各种自述文件来解决这个问题。
If seen stuff like encapsuling a function with ```cs
on the top and ```
in bottom.
然后在某些地方我看到 bash
或 diff
而不是 cs
。
但我无法在我自己的 README 文件中应用这些选项中的任何一个并让它们产生相同的颜色。
它可能与 .gitattributes
文件有关吗?
如果您有 JavaScript 片段,您可以通过以下方式突出显示内容:
```javascript
content
```
(在此处阅读更多内容:https://help.github.com/en/articles/creating-and-highlighting-code-blocks)
README.md
不需要 .gitattributes
文件。当 GitHub (Linguist) 以错误的语法突出显示整个文件时需要它
最后但同样重要的是,GitHub 项目 linguist
.
使 GitHub 中的语法高亮成为可能
我一直试图通过观察 public 存储库上的各种自述文件来解决这个问题。
If seen stuff like encapsuling a function with ```cs
on the top and ```
in bottom.
然后在某些地方我看到 bash
或 diff
而不是 cs
。
但我无法在我自己的 README 文件中应用这些选项中的任何一个并让它们产生相同的颜色。
它可能与 .gitattributes
文件有关吗?
如果您有 JavaScript 片段,您可以通过以下方式突出显示内容:
```javascript
content
```
(在此处阅读更多内容:https://help.github.com/en/articles/creating-and-highlighting-code-blocks)
README.md
不需要 .gitattributes
文件。当 GitHub (Linguist) 以错误的语法突出显示整个文件时需要它
最后但同样重要的是,GitHub 项目 linguist
.