(html)
| 9 | // tag within the tag. Having to manually put that into every HTML |
| 10 | // snippet in each test is tediuous so this function makes it convenient. |
| 11 | function injectDoctocatLinks(html) { |
| 12 | let counter = 0 |
| 13 | return html.replace(/<h\d>/g, (m) => { |
| 14 | return `${m}\n<a href="#section${++counter}" class="doctocat-link">🔗</a>\n` |
| 15 | }) |
| 16 | } |
| 17 | |
| 18 | describe('mini toc items', () => { |
| 19 | // Mock scenario from: /en/rest/reference/activity |