lib/textblock.js
function(block, pos, ctx, callback) {
  if (block.hasOwnProperty('htmlslabs')) {
    outputSlabs(block.htmlslabs, ctx, callback);
  } else {
    if (formats.hasOwnProperty(block.format)) {
      formats[block.format](block, pos, ctx, callback);
    } else {
      callback(new Error('unknown format: ' + block.format));
    }
  }
}
function(block, pos, ctx, callback) {
  if (block.hasOwnProperty('htmlslabs')) {
    outputSlabs(block.htmlslabs, ctx, callback);
  } else {
    if (formats.hasOwnProperty(block.format)) {
      formats[block.format](block, pos, ctx, callback);
    } else {
      callback(new Error('unknown format: ' + block.format));
    }
  }
}
function ( block , pos , ctx , callback ) { if ( block . hasOwnProperty ( 'htmlslabs' ) ) { outputSlabs ( block . htmlslabs , ctx , callback ) ; } else { if ( formats . hasOwnProperty ( block . format ) ) { formats [ block . format ] ( block , pos , ctx , callback ) ; } else { callback ( new Error ( 'unknown format: ' + block . format ) ) ; } } }
Output a text block in HTML.

Warning: This assumes that you have used validateTextBlock or makeTextBlock
to ensure a valid XSS-free textblock.

@param {Object} block The text block to be output
@param {String} pos The position to start adding suffixes to (useful for generating links or pagination)
@param {Object} ctx An object to be passed to all of the rendering functions
@param {Function} callback A callback called with (err, text)
Output a text block in HTML .