Skip to content

Instantly share code, notes, and snippets.

View wadeharrell's full-sized avatar

Wade Harrell wadeharrell

View GitHub Profile
@wadeharrell
wadeharrell / mhll_primitive.js
Created August 8, 2011 20:24
MHLL standoff markup primitive JS function
var i,l,
str = 'Mary had a little lamb, Its fleece was white as snow, And every where that Mary went The lamb was sure to go;',
poetryM = {'stanza':[[0,109]],'line':[[0,23],[24,53],[54,84],[85,109]]};
console.log('the poem is '+str.length+' characters long');
for(i=0,l=poetryM.line.length;i<l;i++){
console.log('line '+i+': '+str.slice(poetryM.line[i][0],poetryM.line[i][1]));
}
@wadeharrell
wadeharrell / mhll_primitive_output.txt
Created August 8, 2011 19:49
MHLL standoff markup primitive JS function output
the poem is 109 characters long
line 0: Mary had a little lamb,
line 1: Its fleece was white as snow,
line 2: And every where that Mary went
line 3: The lamb was sure to go;