Playing around with concepts shown by Sindre Sorhus in https://github.com/sindresorhus/multiline, which had some optimizations that confused me about the idea's basis.
Paste me into your JavaScript console:
var getMultiLineString = function(func) {
var ret, str, temp;
ret = '';
if (typeof func === 'function') {
str = func.toString();
if (str) {
temp = str.split('/*');
if (temp[1]) {
ret = temp[1].split('*/')[0];
}
}
}
return ret;
}
var testme = (function(){/*
// some html to render
<ul>
<li>woo</li>
<li>yay</li>
</ul>
*/});
console.log(getMultiLineString(testme));