mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2024-12-23 05:37:23 +00:00
Install URL-trimming helper.
This commit is contained in:
parent
1441fe3ae5
commit
92128da381
@ -49,6 +49,12 @@ Template helper definitions for Handlebars.
|
||||
return txt && txt.trim() ? _.initial( txt.split(' ') ).join(' ') : '';
|
||||
});
|
||||
|
||||
// Set up a URL-trimming helper to drop the protocol so we can do:
|
||||
// {{trimURL url}}
|
||||
HANDLEBARS.registerHelper("trimURL", function( url ) {
|
||||
return url && url.trim() ? url.trim().replace(/^https?:\/\//i, '') : '';
|
||||
});
|
||||
|
||||
// Set up a Markdown-to-WordProcessingML helper so we can do:
|
||||
// {{either A B}}
|
||||
HANDLEBARS.registerHelper("either", function( lhs, rhs, options ) {
|
||||
|
Loading…
Reference in New Issue
Block a user