Created
June 11, 2013 22:35
-
-
Save doowb/5761378 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var helperList = ['a', 'b', 'c', 'd', 'e']; | |
var documentedList = ['a', 'c']; | |
var undocumentedList = []; | |
helperList.forEach(function(helper) { | |
if(_.contains(documentedList, helper) === false) { | |
undocumentedList.push(helper); | |
} | |
}); | |
console.log(undocumentedList); |
/regex/, [$1]($1)
module.exports.toc = toc = function(src) {
var content;
content = grunt.file.expand(src)
.map(grunt.file.read).join('')
.match(/^(#{1,6})\s*(.*?)\s*#*\s*(?:\n|$)/gm).join('')
.replace(/^(#{1,6})\s*(.*?)\s*#*\s*(?:\n|$)/gm, '$1 [$2](#' + '$2' + ')\n');
return Utils.safeString(content);
};
One
Two
Three
Four
Five
Six
[Heading One](#heading-one)
var list = ['Heading One', 'Heading Two', 'Heading Three', 'Heading Four', 'Heading Five', 'Heading Six'];
var content = '';
list.forEach(function(heading) {
content += '[' + heading + '](#' + _.dashify(heading.toLowercase()) + ')\n';
});
module.exports = {
# jsFiddle: Embed a jsFiddle, second parameter sets tabs
# Usage: {{ jsfiddle [id] [tabs] }}
jsfiddle: jsfiddle = (id, tabs) ->
tabs = "result,js,html,css" if Utils.isUndefined(tabs)
result = '<iframe width="100%" height="300" src="http://jsfiddle.net/' + id + '/embedded/' + tabs + '/presentation/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>'
Utils.safeString(result)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[Heading One](#Heading One)