我的问题
在撰写提交信息时,我尝试使用“`”符号对消息进行代码格式化。
这是我的提交信息:
git commit -am"style(Nav.tsx): adheres to eslint rules
line 92 and 122: add `@returns` in docstrings"
我执行命令后,得到了这个结果
bash: @returns: command not found
[auth 57ee20c] style(Nav.tsx): adheres to eslint rules
1 file changed, 27 insertions(+), 6 deletions(-)
而且提交消息截断了。在 GitHub 上,相关行看起来像这样
line 92 and 122: add in docstrings
我的尝试
我尝试了三个“ ` ”符号,也尝试使用<code></code>
当我使用“```”时,出现了相同的错误和问题;当我使用<code></code>
时,命令未找到
的错误消失了,但提交信息仍然保留着<code></code>
块而没有转换。我还尝试了像这样的字符串转义。
line 92 and 122: add \`@returns\` in docstrings
与代码块类似,提交消息保留 "`" 而不是将其转换。