From 2ddc80fc2000d228e4ec4572d479a0bfc72f50ff Mon Sep 17 00:00:00 2001 From: Sheogorath Date: Sun, 7 Oct 2018 15:21:20 +0200 Subject: [PATCH 1/2] slide example: Add link to slide printing instructions The printing instructions seem to not be really clear. Linking the reveal.js offical docs should help. Signed-off-by: Sheogorath --- public/docs/slide-example.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/docs/slide-example.md b/public/docs/slide-example.md index 411f31d..5503cbd 100644 --- a/public/docs/slide-example.md +++ b/public/docs/slide-example.md @@ -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. -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) --- From 2063eb8bdf9c0537e9fcfadd7f587658c72bd281 Mon Sep 17 00:00:00 2001 From: Sheogorath Date: Wed, 10 Oct 2018 21:24:24 +0200 Subject: [PATCH 2/2] Fix not rendered autocomplete emojis Currently we have some emojis that are autocompleted but won't show up in the resulting document. This patch adds all emojis that are pushed to Codemirror and applies them to the markdown rendering process, so they become usable. Signed-off-by: Sheogorath --- public/js/extra.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/public/js/extra.js b/public/js/extra.js index 7a1077d..fd9b368 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -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 = $(``) + return div[0].outerHTML + } + return match[0] + } +) + // yaml meta, from https://github.com/eugeneware/remarkable-meta function get (state, line) { const pos = state.bMarks[line] @@ -1189,6 +1203,7 @@ function metaPlugin (md) { } md.use(metaPlugin) +md.use(emojijsPlugin) md.use(youtubePlugin) md.use(vimeoPlugin) md.use(gistPlugin)