(
tagName: string,
name: string,
description: string | undefined,
indent: string,
escapeDescription = true
)
| 122 | } |
| 123 | |
| 124 | function xmlDocNamedElement( |
| 125 | tagName: string, |
| 126 | name: string, |
| 127 | description: string | undefined, |
| 128 | indent: string, |
| 129 | escapeDescription = true |
| 130 | ): string[] { |
| 131 | if (!description) return []; |
| 132 | const preparedDescription = escapeDescription ? escapeXml(description.trim()) : description.trim(); |
| 133 | const lines = ensureTrailingPunctuation(preparedDescription).split(/\r?\n/); |
| 134 | const escapedName = escapeXmlAttribute(name); |
| 135 | if (lines.length === 1) { |
| 136 | return [`${indent}/// <${tagName} name="${escapedName}">${lines[0]}</${tagName}>`]; |
| 137 | } |
| 138 | return [ |
| 139 | `${indent}/// <${tagName} name="${escapedName}">`, |
| 140 | ...lines.map((line) => `${indent}/// ${line}`), |
| 141 | `${indent}/// </${tagName}>`, |
| 142 | ]; |
| 143 | } |
| 144 | |
| 145 | function rpcResultDescription(method: RpcMethod, resultSchema: JSONSchema7 | undefined): string | undefined { |
| 146 | if (isVoidSchema(resultSchema)) return undefined; |
no test coverage detected
searching dependent graphs…