From 55b1a17b0d4b1757e9b244ead646183134f96a82 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 18 Aug 2016 15:26:00 +0200 Subject: [PATCH] off by one error --- www/slide/slide.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/www/slide/slide.js b/www/slide/slide.js index 3e0227250..0f5501c85 100644 --- a/www/slide/slide.js +++ b/www/slide/slide.js @@ -40,7 +40,7 @@ define([ var update = Slide.update = function (content) { if (!Slide.shown) { return; } console.log(content); - Slide.content = content.split(/\n\-\-\-\n/).filter(truthy); + Slide.content = content.split(/\n\s*\-\-\-\s*\n/).filter(truthy); draw(Slide.index); }; @@ -52,7 +52,7 @@ define([ var right = Slide.right = function () { console.log('right'); - var i = Slide.index = Math.min(Slide.content.length, Slide.index + 1); + var i = Slide.index = Math.min(Slide.content.length -1, Slide.index + 1); Slide.draw(i); }; @@ -62,6 +62,7 @@ define([ case 37: Slide.left(); break; + case 32: case 39: // right Slide.right(); break;