Skip to content

Instantly share code, notes, and snippets.

@looio
looio / title_markdown_check.js
Created October 24, 2013 07:00
check if the paragraph start with how many %
function processParagraph(paragraph) {
var header = 0;
while (paragraph.charAt(header) == "%")
header++;
if (header > 0)
return {type: "h" + header, content: paragraph.slice(header + 1)};
else
return {type: "p", content: paragraph};
}
@looio
looio / 0_reuse_code.js
Created October 23, 2013 01:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console