(docletSrc)
| 83 | } |
| 84 | |
| 85 | function unwrap(docletSrc) { |
| 86 | if (!docletSrc) { return ''; } |
| 87 | |
| 88 | // note: keep trailing whitespace for @examples |
| 89 | // extra opening/closing stars are ignored |
| 90 | // left margin is considered a star and a space |
| 91 | // use the /m flag on regex to avoid having to guess what this platform's newline is |
| 92 | docletSrc = |
| 93 | // remove opening slash+stars |
| 94 | docletSrc.replace(/^\/\*\*+/, '') |
| 95 | // replace closing star slash with end-marker |
| 96 | .replace(/\**\*\/$/, '\\Z') |
| 97 | // remove left margin like: spaces+star or spaces+end-marker |
| 98 | .replace(/^\s*(\* ?|\\Z)/gm, '') |
| 99 | // remove end-marker |
| 100 | .replace(/\s*\\Z$/g, ''); |
| 101 | |
| 102 | return docletSrc; |
| 103 | } |
| 104 | |
| 105 | /** |
| 106 | * Convert the raw source of the doclet comment into an array of pseudo-Tag objects. |
no outgoing calls
no test coverage detected
searching dependent graphs…