ERROR: The attempt to fetch ' + url + ' failed with the HTTP status ' + xhr.status +
'. Check your browser\'s JavaScript console for more details.' +
'Remember that you need to serve the presentation HTML from a HTTP server and the Markdown file must be there too.
';
}
}
};
xhr.open( 'GET', url, false );
try {
xhr.send();
}
catch ( e ) {
alert( 'Failed to get the Markdown file ' + url + '. Make sure that the presentation and the file are served by a HTTP server and the file can be found there. ' + e );
}
} else if( section.getAttribute( 'data-separator' ) ) {
var markdown = stripLeadingWhitespace( section );
section.outerHTML = slidifyMarkdown( markdown, section.getAttribute( 'data-separator' ), section.getAttribute( 'data-vertical' ), section.getAttribute( 'data-notes' ), getForwardedAttributes( section ) );
}
}
};
function queryMarkdownSlides() {
var sections = document.querySelectorAll( '[data-markdown]');
for( var j = 0, jlen = sections.length; j < jlen; j++ ) {
makeHtml( sections[j] );
}
};
function makeHtml( section ) {
var notes = section.querySelector( 'aside.notes' );
var markdown = stripLeadingWhitespace( section );
section.innerHTML = marked( markdown );
if( notes ) {
section.appendChild( notes );
}
};
queryExternalMarkdown();
queryMarkdownSlides();
})();