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 = {
|
module.exports = {
|
||||||
render: render
|
render: render
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
|
|
||||||
{{#if summary}}
|
{{#if summary}}
|
||||||
<p>{{summary}}</p>
|
<p>{{paragraphSplit summary}}</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if profiles.length}}
|
{{#if profiles.length}}
|
||||||
@@ -128,7 +128,7 @@
|
|||||||
|
|
||||||
{{#if summary}}
|
{{#if summary}}
|
||||||
<div class="summary">
|
<div class="summary">
|
||||||
<p>{{summary}}</p>
|
<p>{{paragraphSplit summary}}</p>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if highlights.length}}
|
{{#if highlights.length}}
|
||||||
|
|||||||
Reference in New Issue
Block a user