From f92ba9340a68493e774d5649c1048247aab4d3bc Mon Sep 17 00:00:00 2001 From: Benoit Schweblin Date: Wed, 7 Feb 2018 21:25:29 +0000 Subject: [PATCH] Fixed custom handlebars handlers --- src/components/Tour.vue | 4 ++-- src/components/menus/WorkspacesMenu.vue | 1 - src/data/emptyTemplateHelpers.js | 2 +- src/services/templateWorker.js | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/Tour.vue b/src/components/Tour.vue index 11f93384..dc35afb6 100644 --- a/src/components/Tour.vue +++ b/src/components/Tour.vue @@ -144,7 +144,7 @@ $tour-step-width: 220px; .tour-step__inner { position: absolute; background-color: $tour-step-background; - padding: 1.25em; + padding: 1.5em 1em 1em; font-size: 0.9em; line-height: 1.33; width: $tour-step-width; @@ -175,7 +175,7 @@ $tour-step-width: 220px; .tour-step--welcome &, .tour-step--end & { left: -$tour-step-width/2; - top: 30px; + top: 36px; border-bottom-right-radius: 0; &::before { diff --git a/src/components/menus/WorkspacesMenu.vue b/src/components/menus/WorkspacesMenu.vue index 0a06334c..957dbbf4 100644 --- a/src/components/menus/WorkspacesMenu.vue +++ b/src/components/menus/WorkspacesMenu.vue @@ -15,7 +15,6 @@ Add CouchDB workspace -
Manage workspaces diff --git a/src/data/emptyTemplateHelpers.js b/src/data/emptyTemplateHelpers.js index 5cc3a784..8187b8da 100644 --- a/src/data/emptyTemplateHelpers.js +++ b/src/data/emptyTemplateHelpers.js @@ -11,6 +11,6 @@ Handlebars.registerHelper('transform', function (options) { Then use the helper in your template: -{{#transform}}{{{file.content.html}}}{{/transform}} +{{#transform}}{{{files.0.content.html}}}{{/transform}} */ diff --git a/src/services/templateWorker.js b/src/services/templateWorker.js index 0edc2f74..ccbb8240 100644 --- a/src/services/templateWorker.js +++ b/src/services/templateWorker.js @@ -59,7 +59,6 @@ const whiteList = { undefined: 1, safeEval: 1, close: 1, - Handlebars: 1, }; let global = self; @@ -80,6 +79,7 @@ while (global !== Object.prototype) { }); global = Object.getPrototypeOf(global); } +self.Handlebars = Handlebars; function safeEval(code) { eval(`"use strict";\n${code}`); // eslint-disable-line no-eval