@ -18,6 +18,7 @@ html
link(rel='stylesheet' href='https://cdn.jsdelivr.net/highlight.js/8.4.0/styles/solarized_light.min.css')
script(src='markdown-it.js')
script(src='https://twemoji.maxcdn.com/twemoji.min.js')
script(src='plugins/markdown-it-emoji.js')
link(rel='stylesheet' href='index.css')
@ -68,6 +68,11 @@
mdHtml.renderer.rules.table_open = function () {
return '<table class="table table-striped">\n';
};
// Replace emoji codes with images
mdHtml.renderer.rules.emoji = function(token, idx) {
console.log(token[idx].name);
return window.twemoji.parse(token[idx].to);
//
// Inject line numbers for sync scroll. Notes:
@ -7,6 +7,10 @@ body
padding-bottom 160px
background-color #fbfbfb
// hack to allign emojies to line height
.emoji
height: 1.2em;
.demo-options
margin-bottom 30px
@ -10,7 +10,7 @@ You will like those projects!
---
# h1 Heading
# h1 Heading 8-)
## h2 Heading
### h3 Heading
#### h4 Heading