lib/retro.js
function retro(content) {
    // Lex incoming markdown file
    var lexed = lex(content);

    // Break it into sections
    var newSections = sections.split(lexed)
    .map(function(section) {
        // Leave non quiz sections untouched
        if(!isQuiz(section)) {
            return section;
        }
        // Convert old section to new format
        return retroSection(section);
    });

    // Bring sections back together into a list of lexed nodes
    var newLexed = sections.join(newSections);

    // Render back to markdown
    return render(newLexed);
}
function retro(content) {
    // Lex incoming markdown file
    var lexed = lex(content);

    // Break it into sections
    var newSections = sections.split(lexed)
    .map(function(section) {
        // Leave non quiz sections untouched
        if(!isQuiz(section)) {
            return section;
        }
        // Convert old section to new format
        return retroSection(section);
    });

    // Bring sections back together into a list of lexed nodes
    var newLexed = sections.join(newSections);

    // Render back to markdown
    return render(newLexed);
}
function retro ( content ) { // Lex incoming markdown file var lexed = lex ( content ) ; // Break it into sections var newSections = sections . split ( lexed ) . map ( function ( section ) { // Leave non quiz sections untouched if ( ! isQuiz ( section ) ) { return section ; } // Convert old section to new format return retroSection ( section ) ; } ) ; // Bring sections back together into a list of lexed nodes var newLexed = sections . join ( newSections ) ; // Render back to markdown return render ( newLexed ) ; }
retro takes an input markdown file and outputs a new markdown file converting in the process old quizs to new ones
retro takes an input markdown file and outputs a new markdown file converting in the process old quizs to new ones