Created
July 27, 2020 15:39
-
-
Save dmlogv/167c1e429ab42c13771ddaf1ecbef265 to your computer and use it in GitHub Desktop.
Collect Habr (or any other Markdown) table of contest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$$('h2,h3').forEach(el => { | |
if (el.hasAttribute('id')) { | |
console.log(`- [${el.innerText}](#${el.id})`); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment