pragraphs on summary text
This commit is contained in:
11
index.js
11
index.js
@@ -20,6 +20,17 @@ function render(resume) {
|
||||
});
|
||||
}
|
||||
|
||||
Handlebars.registerHelper('paragraphSplit', function(plaintext) {
|
||||
var i, output = '',
|
||||
lines = plaintext.split(/\r\n|\r|\n/g);
|
||||
for (i = 0; i < lines.length; i++) {
|
||||
if(lines[i]) {
|
||||
output += '<p>' + lines[i] + '</p>';
|
||||
}
|
||||
}
|
||||
return new Handlebars.SafeString(output);
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
render: render
|
||||
};
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
{{#if summary}}
|
||||
<p>{{summary}}</p>
|
||||
<p>{{paragraphSplit summary}}</p>
|
||||
{{/if}}
|
||||
|
||||
{{#if profiles.length}}
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
{{#if summary}}
|
||||
<div class="summary">
|
||||
<p>{{summary}}</p>
|
||||
<p>{{paragraphSplit summary}}</p>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if highlights.length}}
|
||||
|
||||
Reference in New Issue
Block a user