查看GitHub评论的原始Markdown [英] View raw markdown of GitHub comment
问题描述
如何在GitHub问题中查看评论的降价?例如,我希望看到组成此注释的Markdown: https://github.com/jashkenas/backbone/issues/3857#issue-116738665
How can I view the Markdown of a comment in a GitHub issue? For example, I would like to see the Markdown that makes up this comment: https://github.com/jashkenas/backbone/issues/3857#issue-116738665
推荐答案
First, the first post is the actual issue itself, not accessible but the GitHub issue API:
https://api.github.com/repos/jashkenas /backbone/issues/3857/comments
该列表仅列出3条评论,因为第一篇文章不是评论.
That list only 3 comments, since the first post is not a comment.
问题本身具有格式化的正文:
The issue itself has a formatted body:
https://api.github.com/repos/jashkenas/backbone /issues/3857
返回:
"body": "In Safari , pass a path using unicode string to `navigate` method like this\r\n\r\n```js\r\nBackbone.history.navigate('/city/北京',{trigger:true});\r\n```\r\nThe hash is incorrect. It output\r\n\r\n```js\r\nlocation.hash\r\n//> #/city/%17%AC\r\n```\r\n\r\nI tracked the code, it caused by `_updateHash` method.\r\n\r\nThe call stack created by `History.prototype.navigate` method like this\r\n\r\n* navigate\r\n - decodeFragment\r\n - _updateHash\r\n\r\nThe fragment passed to `_updateHash`, was decoded by `decodeFragment`, so the hash was incorrect。\r\n\r\nI also searched the commit history, the `decodeFragment` added in \"1.2.0\"\r\n\r\nPS: My english is not good, although I am trying to improve\r\n\r\n",
那不是完全 mardown:
That is not exactly mardown:
In Safari , pass a path using unicode string to `navigate` method like this
```js\r\nBackbone.history.navigate('/city/北京',{trigger:true});
```\r\nThe hash is incorrect. It output
```js\r\nlocation.hash
//> #/city/%17%AC
```
I tracked the code, it caused by `_updateHash` method.
The call stack created by `History.prototype.navigate` method like this
* navigate
- decodeFragment
- _updateHash
The fragment passed to `_updateHash`, was decoded by `decodeFragment`, so the hash was incorrect。
I also searched the commit history, the `decodeFragment` added in \"1.2.0\"
PS: My english is not good, although I am trying to improve
本期的第二条评论有两张图片,因此这些奇特的效果不是标记:
The second comment in this issue has two images, so those fancy effects are no markdow:
https://cloud.githubusercontent .com/assets/516562/11164567/62f9ddf6-8b2f-11e5-8aa8-631c1aa84422.gif
[https://jsfiddle.net/leexiaosi/uyp3o6ek/](https://jsfiddle.net/leexiaosi/uyp3o6ek/)
**notice!!!** : please open in safari.
### the record of safari
![safari](https://cloud.githubusercontent.com/assets/516562/11164567/62f9ddf6-8b2f-11e5-8aa8-631c1aa84422.gif)
### the record of chrome
![chrome](https://cloud.githubusercontent.com/assets/516562/11164583/c66d1b82-8b2f-11e5-9d88-ecba16ae6167.gif)
这篇关于查看GitHub评论的原始Markdown的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!