6

I am working on a project that is being collaborated in Gitlab and tried to write the documentation using Github flavored markdown language. I added hyperlinks in following fashion. I learned it from the README.md of Async.js

### Functions
* [`tableList`](#tableList)

<a name="tableList"/>

### tableList ( callback )

Lists all the tables in connected database.


___Arguments___

* `callback`[Function] : Callback function

___Example___

```js
db_wrapper.tableList( function( err, response ){
    // Do something.
});
```

But in this way hyperlink is not appearing. What is the problem? Is the markdown syntax of Gitlab different from Github? My README.md file is here. And it appears like the image below.

Hyperlink appearance

4

2 回答 2

3

Github中添加超链接的语法如下 - [Text](#section_name)。但是 Gitlab 不支持相同的语法。不知道是bug还是什么。在 Gitlab 中,需要像链接一样添加超链接。您需要提供完整的网址,如下所示 - [Text](full url of the section)

于 2014-08-25T02:41:33.403 回答
1

关于第一个链接,请确保在标题后留一个空行:

### Functions

* [`tableList`](#tableList)

caolan/async/README.md包含链接:

## Documentation

### Collections

* [`each`](#each)
* [`eachSeries`](#eachSeries)

目标部分为:

<a name="each" />
### each(arr, iterator, callback

您需要在链接引用的部分之前添加锚点的名称。

请注意,应该有,因为 GitLab 6.6(2014 年 2 月)自动为降价文档的任何部分添加了锚点。
请参阅提交 61748c9拉取请求 6219建议 4533114

于 2014-08-23T19:10:09.137 回答