| 171 | } |
| 172 | |
| 173 | function buildFootnoteArray(footnotes: [number, string, string][]): string { |
| 174 | return footnotes |
| 175 | .map(([index, title, link]) => |
| 176 | link === title |
| 177 | ? `<code style="font-size: 90%; opacity: 0.6;">[${index}]</code>: <i style="word-break: break-all">${title}</i><br/>` |
| 178 | : `<code style="font-size: 90%; opacity: 0.6;">[${index}]</code> ${title}: <i style="word-break: break-all">${link}</i><br/>` |
| 179 | ) |
| 180 | .join("\n"); |
| 181 | } |
| 182 | |
| 183 | function transform(legend: string, text: string | null, title: string | null): string { |
| 184 | const options = legend.split("-"); |