diff --git a/src/gen/template-generator.js b/src/gen/template-generator.js index 547579c..121402d 100644 --- a/src/gen/template-generator.js +++ b/src/gen/template-generator.js @@ -28,8 +28,8 @@ var _defaultOpts = { out: function( txt ) { return txt; }, raw: function( txt ) { return txt; }, xml: function( txt ) { return XML(txt); }, - md: function( txt ) { return MD(txt); }, - mdin: function( txt ) { return MD(txt).replace(/^\s*\
|\<\/p\>\s*$/gi, ''); }, + md: function( txt ) { return MD( txt || '' ); }, + mdin: function( txt ) { return MD(txt || '' ).replace(/^\s*\
|\<\/p\>\s*$/gi, ''); }, lower: function( txt ) { return txt.toLowerCase(); }, link: function( name, url ) { return url ? '' + name + '' : name }