(...nodes)
| 167 | const turndown = new TurndownService({ |
| 168 | bulletListMarker: "-", |
| 169 | codeBlockStyle: "fenced", |
| 170 | headingStyle: "atx", |
| 171 | }); |
| 172 | |
| 173 | turndown.use(gfm); |
| 174 | |
| 175 | function getCodeText(code) { |
| 176 | const tokenLines = Array.from(code.querySelectorAll(".token-line")); |
| 177 | if (tokenLines.length) { |
| 178 | return tokenLines.map((line) => line.textContent).join("\n"); |
| 179 | } |
| 180 |