chore: add comments

pull/13698/head
paoloricciuti 2 years ago
parent 2e1634fef9
commit 94d9b52a73

@ -1283,9 +1283,13 @@ function extract_type_and_comment(declarator, str, path) {
.map((line) => .map((line) =>
line line
.trim() .trim()
// replace `// ` for one liners
.replace(/^\/\/\s*/g, '') .replace(/^\/\/\s*/g, '')
.replace(/^\/\*\*\s*/g, '') // replace `\**` for the initial JSDoc
.replace(/^\/\*\*?\s*/g, '')
// migrate `*/` for the end of JSDoc
.replace(/\s*\*\/$/g, '') .replace(/\s*\*\/$/g, '')
// remove any initial `* ` to clean the comment
.replace(/^\*\s*/g, '') .replace(/^\*\s*/g, '')
) )
.filter(Boolean); .filter(Boolean);

Loading…
Cancel
Save