function unwrap(docletSrc) {
	if (!docletSrc) { return ''; }

	// note: keep trailing whitespace for @examples
	// extra opening/closing stars are ignored
	// left margin is considered a star and a space
	// use the /m flag on regex to avoid having to guess what this platform's newline is
	docletSrc =
		docletSrc.replace(/^\/\*\*+/, '') // remove opening slash+stars
		.replace(/\**\*\/$/, "\\Z")       // replace closing star slash with end-marker
		.replace(/^\s*(\* ?|\\Z)/gm, '')  // remove left margin like: spaces+star or spaces+end-marker
		.replace(/\s*\\Z$/g, '');         // remove end-marker

	return docletSrc;
}
/**
 * Removes the mandatory comment markers and the optional but common asterisks at the beginning of each JSDoc comment line.
 *
 * The result is easier to parse/analyze.
 *
 * Implementation is a 1:1 copy from JSDoc's lib/jsdoc/doclet.js (closure function, not directly reusable)
 *
 * @param {string} docletSrc the source comment with or without block comment markers
 * @returns {string} the unwrapped content of the JSDoc comment
 *
 */
Removes the mandatory comment markers and the optional but common asterisks at the beginning of each JSDoc comment line.
The result is easier to parse/analyze.

Implementation is a 1:1 copy from JSDoc's lib/jsdoc/doclet.js (closure function, not directly reusable)

@param {string} docletSrc the source comment with or without block comment markers
@returns {string} the unwrapped content of the JSDoc comment
Removes the mandatory comment markers and the optional but common asterisks at the beginning of each JSDoc comment line . The result is easier to parse / analyze . Implementation is a 1 : 1 copy from JSDoc ' s lib / jsdoc / doclet . js ( closure function not directly reusable ) @param { string } docletSrc the source comment with or without block comment markers @returns { string } the unwrapped content of the JSDoc comment
function unwrap(docletSrc) {
	if (!docletSrc) { return ''; }
	docletSrc =
		docletSrc.replace(/^\/\*\*+/, '') 
		.replace(/\**\*\/$/, "\\Z")       
		.replace(/^\s*(\* ?|\\Z)/gm, '')  
		.replace(/\s*\\Z$/g, '');         
	return docletSrc;
}
function unwrap ( docletSrc ) { if ( ! docletSrc ) { return '' ; } docletSrc = docletSrc . replace ( / ^\/\*\*+ / , '' ) . replace ( / \**\*\/$ / , "\\Z" ) . replace ( / ^\s*(\* ?|\\Z) / gm , '' ) . replace ( / \s*\\Z$ / g , '' ) ; return docletSrc ; }
Removes the mandatory comment markers and the optional but common asterisks at the beginning of each JSDoc comment line.
Removes the mandatory comment markers and the optional but common asterisks at the beginning of each JSDoc comment line .
// note: keep trailing whitespace for @examples // extra opening/closing stars are ignored // left margin is considered a star and a space // use the /m flag on regex to avoid having to guess what this platform's newline is // remove opening slash+stars // replace closing star slash with end-marker // remove left margin like: spaces+star or spaces+end-marker // remove end-marker