jsdoc-to-markdown
jsdoc-to-markdown copied to clipboard
"|" symbol in parameter description is not escaped
Hello. When jsdoc @param
or @returns
have description that contains |
symbol it will be not escaped properly and could break table layout.
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.
@75lb, it worked, thanks. But I think it would be a good idea to replace such char with |
or something similar.
|
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.
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.