Comparing version 0.7.1 to 0.7.2
{ | ||
"author" : { | ||
"name" : "constantology", | ||
"email" : "constantology@gmail.com", | ||
"email" : "christos@muigui.com", | ||
"url" : "http://muigui.com" | ||
@@ -22,3 +22,3 @@ }, | ||
}, | ||
"version" : "0.7.1" | ||
"version" : "0.7.2" | ||
} |
@@ -1,20 +0,28 @@ | ||
!function() { | ||
var id, u = 'undefined'; | ||
if ( typeof module != u && typeof require != u ) { | ||
Object.keys( require.cache ).some( function( k ) { | ||
if ( /Templ8(\.[^\.]+){0,}\.js$/.test( k ) ) { id = k; return true; } | ||
!function( root ) { | ||
var el, txt, u, undef = u + ''; | ||
typeof Templ8 != undef || typeof require == undef || ( Templ8 = require( 'Templ8' ) ); | ||
if ( typeof root.document != undef ) { | ||
el = document.createElement( 'div' ); | ||
txt = el.appendChild( document.createTextNode( '' ) ); | ||
Templ8.Filter.add( 'escapeHTML', function( str ) { | ||
txt.data = str; | ||
var s = el.innerHTML; | ||
txt.data = ''; | ||
return s; | ||
} ); | ||
!id || ( Templ8 = require.cache[id].exports ); | ||
} | ||
typeof Templ8 == u || Templ8.Filter.add( { | ||
bold : function( str ) { return Templ8.format( '<strong>{0}</strong>', Templ8.stringify( str ) ); }, | ||
italics : function( str ) { return Templ8.format( '<em>{0}</em>', Templ8.stringify( str ) ); }, | ||
linebreaks : function( str ) { return Templ8.stringify( str ).replace( /[\r\n]/gm, '<br />\n' ); }, | ||
link : function( url, str ) { | ||
str = typeof str == 'string' ? str : url; | ||
return str.link( ( !!~url.indexOf( '@' ) ? 'mailto:' : '' ) + url ); | ||
}, | ||
paragraph : function( str ) { return Templ8.stringify( str ).replace( /([^\r\n]+)/gm, '<p>$1</p>' ); }, | ||
stripe : function( i ) { return parseInt( i, 10 ) & 1 ? 'stripe-odd' : 'stripe-even'; } | ||
Templ8.Filter.add( { | ||
bold : function( str ) { return Templ8.format( '<strong>{0}</strong>', Templ8.stringify( str ) ); }, | ||
italics : function( str ) { return Templ8.format( '<em>{0}</em>', Templ8.stringify( str ) ); }, | ||
linebreaks : function( str ) { return Templ8.stringify( str ).replace( /[\r\n]/gm, '<br />\n' ); }, | ||
link : function( url, str ) { | ||
str = typeof str == 'string' ? str : url; | ||
return str.link( ( !!~url.indexOf( '@' ) ? 'mailto:' : '' ) + url ); | ||
}, | ||
paragraph : function( str ) { return Templ8.stringify( str ).replace( /([^\r\n]+)/gm, '<p>$1</p>' ); }, | ||
stripe : function( i ) { return parseInt( i, 10 ) & 1 ? 'stripe-odd' : 'stripe-even'; } | ||
} ); | ||
}(); | ||
}( typeof Templ8 != 'undefined' ? Templ8.global : this ); |
@@ -696,3 +696,4 @@ !function(root) { | ||
typeof global == UNDEF || (root = global); | ||
if (typeof module != UNDEF && "exports" in module) module.exports = Templ8; else root.Templ8 = Templ8; | ||
Templ8.global = root; | ||
typeof module != UNDEF && "exports" in module ? module.exports = Templ8 : root.Templ8 = Templ8; | ||
}(this); |
52248
9
735