docs: function(source, type) {
    if (source.hasOwnProperty('format')) {
      if (source.format !== type) {
        if (source.format === 'section') {
          var blocks = [];
          source.blocks.forEach(function(val, index, array) {
            var block = deleteTextBlockFormat(val, type);
            if (block) {
              blocks.push(block);
            }
          });
          if (blocks.length) {
            return {format: 'section', blocks: blocks};
          } else {
            return null;
          }
        } else {
          return source;
        }
      } else {
        return null;
      }
    }
    throw new Error('invalid format for textblock (did you pass an Object in?)');
  }