From b4147522312621997f7621fee8d69444f533d873 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Wed, 14 Aug 2013 20:50:01 +0200 Subject: [PATCH] Add wordwrap to the event text. --- event.js | 5 +++-- package.json | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/event.js b/event.js index d291f4d..3f09b4c 100644 --- a/event.js +++ b/event.js @@ -20,7 +20,8 @@ var ,strftime = require('strftime') ,fs = require('fs') ,glob = require('glob') - ,jq = require('jquery'); + ,jq = require('jquery') + ,wrap = require('wordwrap')(72); function nextDay(x){ var now = new Date(); @@ -62,7 +63,7 @@ EventTool.prototype.processEventData = function() { item['enddate'] = strftime('%Y-%m-%d %H:%M',el.enddate); item['endtime'] = strftime('%H:%M',el.enddate); item['heading'] = el.heading; - item['text'] = el.text; + item['text'] = wrap(el.text); view.events.push(item); }); return view; diff --git a/package.json b/package.json index b82ed6a..3d15beb 100644 --- a/package.json +++ b/package.json @@ -10,5 +10,6 @@ , "glob": "latest" , "jquery": "latest" , "request": "latest" + , "wordwrap": "latest" } }