diff --git a/index.js b/index.js index d7e7b44..218ce95 100644 --- a/index.js +++ b/index.js @@ -6,7 +6,7 @@ const addInherited = require('jsdoc/augment').addInherited; // eslint-disable-li const importRegEx = /import\(["']([^"']*)["']\)(?:\.([^ \.\|\}><,\)=#\n]*))?([ \.\|\}><,\)=#\n])/g; -const typedefRegEx = /@typedef \{[^\}]*\} (\S+)/g; +const typedefRegEx = /@typedef\s*(?:\{[^\}]*\}\s*)?([^\{\}\s]+)/g; const noClassdescRegEx = /@(typedef|module|type)/; const extensionReplaceRegEx = /\.m?js$/; const extensionEnsureRegEx = /(\.js)?$/;