{"push_id":956488833,"size":1,"distinct_size":1,"ref":"refs/heads/emoji-in-heading-anchors","head":"d729164c9ce5304f781b4336868e04108bc5ae4e","before":"7e384da1b396e50c3eebabafc283f3469f07497f","commits":[{"sha":"d729164c9ce5304f781b4336868e04108bc5ae4e","author":{"email":"39c0b539918b272818bb7d14d34921da39bcf5e1@sencha.com","name":"Revin Guillen"},"message":"Convert emoji to shortcode names in generated heading IDs\n\nThis commit changes the headings.js module into a markdown-it plugin\nthat does the same slug generation and HTML modifications the older code\ndid, but in such a way that makes it possible to generate heading\nanchors that match what GitHub generates.\n\nWe do this by creating a markdown-it renderer rule for 'heading_open'\ntokens, and performing a few different operations:\n\n1. Check to see if the heading already contains a link. If so, skip the\n   heading.\n2. Render to HTML a version of the heading's markdown that has had\n   github-style `:emoji:` gemoji strings converted back from unicode\n   (the markdown-it-emoji plugin does its translation when the markdown\n   is parsed, not when it's rendered). The goal here is to let\n   github-slugger properly drop unicode emoji from generated slugs, but\n   include the shortcode names for gemoji.\n3. Build the slug with github-slugger. We do this by running it through\n   `cheerio` first so we can match our previous behavior, i.e., deal\n   with embedded HTML more cleanly.\n4. Add the `deep-link` class to the heading.\n5. Wrap the contents of the heading in a link using the generated slug\n   in its `href` attribute.\n\nThis commit also includes a handful of tests that put the slug\ngeneration code through its paces, by trying various combinations of\nunicode emoji, gemoji, hyphens, colons, etc...\n\nAnd finally, we trim our node_modules a little by only depending on the\nspecific `lodash` modules we're actually using, rather than all of\nlodash itself.","distinct":true,"url":"https://api.github.com/repos/revin/marky-markdown/commits/d729164c9ce5304f781b4336868e04108bc5ae4e"}]}