* Process the markdown source in a doclet. The properties that should be processed are * configurable, but always include "author", "classdesc", "description", "exceptions", "params", * "properties", "returns", and "see". Handled properties can be bare strings, objects, or arrays * of objects.
(doclet)
| 40 | * of objects. |
| 41 | */ |
| 42 | function process(doclet) { |
| 43 | tags.forEach(tag => { |
| 44 | if ( !hasOwnProp.call(doclet, tag) ) { |
| 45 | return; |
| 46 | } |
| 47 | |
| 48 | if (typeof doclet[tag] === 'string' && shouldProcessString(tag, doclet[tag]) ) { |
| 49 | doclet[tag] = parse(doclet[tag]); |
| 50 | } |
| 51 | else if ( Array.isArray(doclet[tag]) ) { |
| 52 | doclet[tag].forEach((value, index, original) => { |
| 53 | const inner = {}; |
| 54 | |
| 55 | inner[tag] = value; |
| 56 | process(inner); |
| 57 | original[index] = inner[tag]; |
| 58 | }); |
| 59 | } |
| 60 | else if (doclet[tag]) { |
| 61 | process(doclet[tag]); |
| 62 | } |
| 63 | }); |
| 64 | } |
| 65 | |
| 66 | // set up the list of "tags" (properties) to process |
| 67 | if (config.tags) { |
no test coverage detected
searching dependent graphs…