function find_changes_from(notebook) {
        var changes = [];
        var nf = notebook.files,
            cf = _.extend({}, current_gist_.files); // to keep track of changes
        for(var f in nf) {
            if(f==='r_type' || f==='r_attributes')
                continue; // R metadata
            if(f in cf) {
                if(cf[f].language != nf[f].language || cf[f].content != nf[f].content) {
                    changes.push({id: f,
                                  language: cf[f].language,
                                  content: cf[f].content});
                }
                delete cf[f];
            }
            else changes.push({id: f, erase: true, language: nf[f].language});
        }
        for(f in cf) {
            if(f==='r_type' || f==='r_attributes')
                continue; // artifact of rserve.js
            changes.push({id: f,
                          language: cf[f].language,
                          content: cf[f].content});
        }
        return changes;
    }
// back to what we are presently displaying (current_gist_)
back to what we are presently displaying (current_gist_)
back to what we are presently displaying ( current_gist_ )
function find_changes_from(notebook) {
        var changes = [];
        var nf = notebook.files,
            cf = _.extend({}, current_gist_.files); 
        for(var f in nf) {
            if(f==='r_type' || f==='r_attributes')
                continue; 
            if(f in cf) {
                if(cf[f].language != nf[f].language || cf[f].content != nf[f].content) {
                    changes.push({id: f,
                                  language: cf[f].language,
                                  content: cf[f].content});
                }
                delete cf[f];
            }
            else changes.push({id: f, erase: true, language: nf[f].language});
        }
        for(f in cf) {
            if(f==='r_type' || f==='r_attributes')
                continue; 
            changes.push({id: f,
                          language: cf[f].language,
                          content: cf[f].content});
        }
        return changes;
    }
function find_changes_from ( notebook ) { var changes = [ ] ; var nf = notebook . files , cf = _ . extend ( { } , current_gist_ . files ) ; for ( var f in nf ) { if ( f === 'r_type' || f === 'r_attributes' ) continue ; if ( f in cf ) { if ( cf [ f ] . language != nf [ f ] . language || cf [ f ] . content != nf [ f ] . content ) { changes . push ( { id : f , language : cf [ f ] . language , content : cf [ f ] . content } ) ; } delete cf [ f ] ; } else changes . push ( { id : f , erase : true , language : nf [ f ] . language } ) ; } for ( f in cf ) { if ( f === 'r_type' || f === 'r_attributes' ) continue ; changes . push ( { id : f , language : cf [ f ] . language , content : cf [ f ] . content } ) ; } return changes ; }
back to what we are presently displaying (current_gist_)
back to what we are presently displaying ( current_gist_ )
// to keep track of changes // R metadata // artifact of rserve.js