clenemt / docdash

:zap: Lodash inspired JSDoc 3 template/theme
http://clenemt.github.io/docdash/
Other
824 stars 201 forks source link

Why do I use Chinese in the @module, the method below the module cannot be opened in the page #118

Closed bubble1001 closed 1 year ago

bubble1001 commented 1 year ago

I used the Chinese in @module, so in the generated document page, when I click the function name under the Chinese name, the page displays "Your file couldn't be accessed", it seems that the url has been used 'encodedURI()' many times

ar2rsawseen commented 1 year ago

Hello, can you provide small example to reproduce?

bubble1001 commented 1 year ago

My usage is like this:

/*@module 加法 /

/**

In the final generated document page, click the add() method under the document directory "加法", and the page prompts "Your file couldn't be accessed" image

ar2rsawseen commented 1 year ago

Hello, thank you, I could track it to JSDoc place here: https://github.com/jsdoc/jsdoc/blob/main/packages/jsdoc-template-legacy/lib/templateHelper.js#L351

So, most probably, it is not a template problem but JSDoc problem in overall.

Have you experienced the same with the default JSDoc template?

ar2rsawseen commented 1 year ago

So for example, as far as I see here https://github.com/clenemt/docdash/blob/master/publish.js#L386 we feed method.longname as module:加法~add and get result as <a href="module-%2525E5%25258A%2525A0%2525E6%2525B3%252595.html#~add">add</a> which is already double encoded

bubble1001 commented 1 year ago

Thanks for your reply, but I don't have same problem when I use other templates. And after I fix it like this, the above problem will not occur again. https://github.com/clenemt/docdash/pull/119,