MCPcopy Create free account
hub / github.com/DavidWells/analytics / renderArg

Function renderArg

scripts/docs.js:817–834  ·  view source on GitHub ↗
(tag)

Source from the content-addressed store, hash-verified

815}
816
817function 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
837function renderArgWithDoxxx(tag) {

Callers 1

formatArgumentsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected