(
codeRef: RefObject<HTMLDivElement | null>,
files: DownloadFiles['files'],
urls: {[name: string]: string},
entry: string | undefined
)
| 287 | } |
| 288 | |
| 289 | function getExampleFiles( |
| 290 | codeRef: RefObject<HTMLDivElement | null>, |
| 291 | files: DownloadFiles['files'], |
| 292 | urls: {[name: string]: string}, |
| 293 | entry: string | undefined |
| 294 | ): DownloadFiles['files'] { |
| 295 | if (!entry) { |
| 296 | return { |
| 297 | ...files, |
| 298 | 'Example.tsx': {contents: getExampleCode(codeRef, urls)} |
| 299 | }; |
| 300 | } |
| 301 | |
| 302 | return files; |
| 303 | } |
| 304 | |
| 305 | function getTextContent(element: Element) { |
| 306 | // Manually walk over text nodes inside the element and concatenate them. |
no test coverage detected