From 0ba55cbc8716e08930665d7aaa11eb7899cdb07b Mon Sep 17 00:00:00 2001 From: peeyush Date: Wed, 9 Jul 2014 20:15:35 +0530 Subject: [PATCH] Format education area and studyType Earlier, it used to leave a comma if any of them was absent. --- index.js | 5 +++++ resume.template | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index d2adffa..02a50f5 100644 --- a/index.js +++ b/index.js @@ -15,6 +15,11 @@ function render(resumeObject) { } }); _.each(resumeObject.education, function(e){ + if( !e.area || !e.studyType ){ + e.educationDetail = (e.area == null ? '' : e.area) + (e.studyType == null ? '' : e.studyType); + } else { + e.educationDetail = e.area + ", "+ e.studyType; + } e.startDateYear = e.startDate.substr(0,4); if(e.endDate) { e.endDateYear = e.endDate.substr(0,4); diff --git a/resume.template b/resume.template index 1677169..d7801c4 100644 --- a/resume.template +++ b/resume.template @@ -93,7 +93,7 @@
{{#education}}

{{institution}}

-

{{area}}, {{studyType}}

+

{{educationDetail}}

{{startDateYear}} - {{endDateYear}}

{{summary}}