How to escape a '#' so it will NOT reference an issue in a GitHub comment?

可紊 提交于 2019-12-07 22:40:47

问题


As opposed to reference an issue, I want to just output the text #5 without any link. How can I do that?

For example, a shader error message from Unity could contain # and a followed number:

Shader error in 'Nature/Terrain/Standard':
actual parameter #3 must be same type as formal out parameter ("weight")
actual parameter #4 must be same type as formal out parameter ("mixedDiffuse")
actual parameter #5 must be same type as formal out parameter ("mixedNormal")
too many parameters in function call at line 64 (on d3d9)

I have tried \#5 and #5 but they don't work: still linked.

The question doesn't focus on how to escape #, but #5, which will be translated to a link to another issue. That's unexpected.


回答1:


You could put an invisible character between the # and the number.

e.g.

#​5 will be rendered as #5 on GitHub.

​ being the unicode "zero width space" character.



来源:https://stackoverflow.com/questions/52447434/how-to-escape-a-so-it-will-not-reference-an-issue-in-a-github-comment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!