Merge branch 'master' into DepauMD

This commit is contained in:
Davide Depau 2018-10-23 03:00:11 +02:00
commit e8e503ceda
2 changed files with 16 additions and 1 deletions

View file

@ -270,7 +270,7 @@ Press `B` or `.` on your keyboard to pause the presentation. This is helpful whe
Down below you can find a print icon<i class="fa fa-fw fa-print"></i>. Down below you can find a print icon<i class="fa fa-fw fa-print"></i>.
After you click on it, use the print function of your browser (either CTRL+P or cmd+P) to print the slides as PDF. After you click on it, use the print function of your browser (either CTRL+P or cmd+P) to print the slides as PDF. [See official reveal.js instructions for details](https://github.com/hakimel/reveal.js#instructions-1)
--- ---

View file

@ -1145,6 +1145,20 @@ const pdfPlugin = new Plugin(
} }
) )
const emojijsPlugin = new Plugin(
// regexp to match emoji shortcodes :something:
/:([\d\D]*):/,
(match, utils) => {
const emoji = match[1] ? match[1].toLowerCase() : undefined
if (window.emojify.emojiNames.includes(emoji)) {
const div = $(`<img class="emoji" src="${serverurl}/build/emojify.js/dist/images/basic/${emoji}.png"></img>`)
return div[0].outerHTML
}
return match[0]
}
)
// yaml meta, from https://github.com/eugeneware/remarkable-meta // yaml meta, from https://github.com/eugeneware/remarkable-meta
function get (state, line) { function get (state, line) {
const pos = state.bMarks[line] const pos = state.bMarks[line]
@ -1189,6 +1203,7 @@ function metaPlugin (md) {
} }
md.use(metaPlugin) md.use(metaPlugin)
md.use(emojijsPlugin)
md.use(youtubePlugin) md.use(youtubePlugin)
md.use(vimeoPlugin) md.use(vimeoPlugin)
md.use(gistPlugin) md.use(gistPlugin)