| 815 | } |
| 816 | |
| 817 | function renderArg(tag) { |
| 818 | const optionalText = (tag.name.match(/^\[/)) ? '(optional) ' : '' |
| 819 | if (tag.name === '[data]') { |
| 820 | // console.log('tag', tag) |
| 821 | } |
| 822 | let typesDescription = tag.typesDescription |
| 823 | // Remove link from description |
| 824 | if (tag.typesDescription.match((/<a href/))) { |
| 825 | // console.log('tag.typesDescription', tag.typesDescription) |
| 826 | // console.log('tag.types[0]', tag.types[0]) |
| 827 | const realLink = SRC_LINKS[tag.types[0]] |
| 828 | // console.log('realLink', realLink) |
| 829 | if (realLink) { |
| 830 | typesDescription = tag.typesDescription.replace(/href="(.*?)"/, `href="${realLink}"`) |
| 831 | } |
| 832 | } |
| 833 | return `- **${tag.name}** ${optionalText}${typesDescription} ${tag.description}` |
| 834 | } |
| 835 | |
| 836 | |
| 837 | function renderArgWithDoxxx(tag) { |