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

"|" symbol in parameter description is not escaped #110

Open
SkeLLLa opened this issue Jan 4, 2017 · 4 comments
Open

"|" symbol in parameter description is not escaped #110

SkeLLLa opened this issue Jan 4, 2017 · 4 comments
Labels
template Requires a change to a dmd partial/helper

Comments

@SkeLLLa
Copy link

SkeLLLa commented Jan 4, 2017

Hello. When jsdoc @param or @returns have description that contains | symbol it will be not escaped properly and could break table layout.

@75lb
Copy link
Member

75lb commented Jan 4, 2017

hi! In that case, try rendering your docs using --no-gfm. This mode avoids using github-flavoured markdown, using html in most cases. This prevents table layout being broken.

@SkeLLLa
Copy link
Author

SkeLLLa commented Jan 4, 2017

@75lb, it worked, thanks. But I think it would be a good idea to replace such char with | or something similar.

@75lb
Copy link
Member

75lb commented Jan 4, 2017

&#124 is used in all cases where a | is generated by the tool, however i don't believe jsdoc2md looks for (and replaces) | characters in user-generated descriptions.. I will check tonight.

@kczx3
Copy link

kczx3 commented Mar 7, 2018

Was this ever further investigated? I see an issue as well when I try to document multiple types for a function parameter.

/**
 * Build a span that will link to results, applies class 'mun_launch_results' for jQuery Click handlers
 * @param {(string|number)} id - The ID to use
 * @return {String}
 */
export const getResultsLinkSpan = (id) => `<span id="${id}">Test</span>`;

EDIT: Actually, I think this is due to the rendering of MarkDown by our version of GitLab. It appears fine when previewing it in VSCode.

@75lb 75lb added the template Requires a change to a dmd partial/helper label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
template Requires a change to a dmd partial/helper
Development

No branches or pull requests

3 participants