build/updates/builder.js
function (md) {
            var html = marked(md, this.options.markdown);
            //Only reprocess if helpers were asked for
            if (this.options.helpers || (html.indexOf('{{#crossLink') > -1)) {
                //console.log('MD: ', html);
                try {
                    // marked auto-escapes quotation marks (and unfortunately
                    // does not expose the escaping function)
                    html = html.replace(/&quot;/g, "\"");
                    html = (Y.Handlebars.compile(html))({});
                } catch (hError) {
                    //Remove all the extra escapes
                    html = html.replace(/\\{/g, '{').replace(/\\}/g, '}');
                    Y.log('Failed to parse Handlebars, probably an unknown helper, skipping..', 'warn', 'builder');
                }
                //console.log('HB: ', html);
            }
            return html;
        }
function (md) {
            var html = marked(md, this.options.markdown);
            //Only reprocess if helpers were asked for
            if (this.options.helpers || (html.indexOf('{{#crossLink') > -1)) {
                //console.log('MD: ', html);
                try {
                    // marked auto-escapes quotation marks (and unfortunately
                    // does not expose the escaping function)
                    html = html.replace(/&quot;/g, "\"");
                    html = (Y.Handlebars.compile(html))({});
                } catch (hError) {
                    //Remove all the extra escapes
                    html = html.replace(/\\{/g, '{').replace(/\\}/g, '}');
                    Y.log('Failed to parse Handlebars, probably an unknown helper, skipping..', 'warn', 'builder');
                }
                //console.log('HB: ', html);
            }
            return html;
        }
function ( md ) { var html = marked ( md , this . options . markdown ) ; //Only reprocess if helpers were asked for if ( this . options . helpers || ( html . indexOf ( '{{#crossLink' ) > - 1 ) ) { //console.log('MD: ', html); try { // marked auto-escapes quotation marks (and unfortunately // does not expose the escaping function) html = html . replace ( / &quot; / g , "\"" ) ; html = ( Y . Handlebars . compile ( html ) ) ( { } ) ; } catch ( hError ) { //Remove all the extra escapes html = html . replace ( / \\{ / g , '{' ) . replace ( / \\} / g , '}' ) ; Y . log ( 'Failed to parse Handlebars, probably an unknown helper, skipping..' , 'warn' , 'builder' ) ; } //console.log('HB: ', html); } return html ; }
Wrapper around the Markdown parser so it can be normalized or even side stepped
@method markdown
@private
@param {String} md The Markdown string to parse
@return {HTML} The rendered HTML
Wrapper around the Markdown parser so it can be normalized or even side stepped