Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apiName and apiGroup encoded error in chinese #432

Closed
whitelujx opened this issue Mar 11, 2016 · 3 comments
Closed

apiName and apiGroup encoded error in chinese #432

whitelujx opened this issue Mar 11, 2016 · 3 comments

Comments

@whitelujx
Copy link

/**
 * @api {get} /user/:id     api获取用户信息
 * @apiName                 apiName获取用户信息
 * @apiGroup                apiGroup分组
 * @apiDescription          description描述信息
 */

------ api_data.json -------
{
"type": "get",
"url": "/user/:id",
"title": "api获取用户信息",
"name": "apiName______",
"group": "apiGroup__",
"description": "description描述信息"
}

apiName and apiGroup encoded error in chinese, but title and description is right.
apidoc version is 0.15.1

@anlebcoder
Copy link

Hi.我也是用中文的,没问题的啊,但是我遇到了另外的问题,@api 的path 一样 会导致 无法显示。看我发的issue

@rottmann
Copy link
Member

Currently Unicode is not supported.

@vipzhicheng
Copy link

After did below actions, Apidoc can support Chinese.

node_modules/apidoc-core/lib/workers/api_group.js

group = group.replace(/[^\w]/g, ''); --> group = group.replace(/[^\w\u4E00-\u9FA5]/g, '');

api_name.js

name = name.replace(/[^\w]/g, ''); --> name = name.replace(/[^\w\u4E00-\u9FA5]/g, '');

But it's very not convenient if I do it manually, please think about it and update the package, thanks a lot in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants