Commit a4596bf0 authored by Wiktor Walasek's avatar Wiktor Walasek

And one more cr fix as I restored old lines badly

parent 1c757437
...@@ -46,7 +46,7 @@ const tagSynonyms = { ...@@ -46,7 +46,7 @@ const tagSynonyms = {
* @return {String} * @return {String}
*/ */
function formatDescription(text, insertDot) { function formatDescription(text, insertDot) {
text = text.trim() text = text ? text.trim() : ''
if (!text) return '' if (!text) return ''
text = text.replace(/\s\s+/g, ' ') // Avoid multiple spaces text = text.replace(/\s\s+/g, ' ') // Avoid multiple spaces
text = text.replace(/\n/g, ' ') // Make single line text = text.replace(/\n/g, ' ') // Make single line
...@@ -129,7 +129,7 @@ function jsdocParser(text, parsers, options) { ...@@ -129,7 +129,7 @@ function jsdocParser(text, parsers, options) {
} }
} }
if (tag.description && ['description', 'param', 'return', 'todo'].includes(tag.title)) if (['description', 'param', 'return', 'todo'].includes(tag.title))
tag.description = formatDescription(tag.description, options.jsdocAddDotToDescription) tag.description = formatDescription(tag.description, options.jsdocAddDotToDescription)
if (!tag.description && ['description', 'param', 'return', 'todo', 'memberof'].includes(tag.title) && if (!tag.description && ['description', 'param', 'return', 'todo', 'memberof'].includes(tag.title) &&
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment