lib/compiler.js
function compile(ast, opts) {
  opts = assign({}, config.defaultOpts, opts)
  debug('compile', opts, ast)
  var worker = makeWorker(opts)
  for (var i = 0, text = ast.value, len = text.length; i < len; i++) {
    compileLine(text[i], worker)
  }
  return worker.buf.join('')
}
function compile(ast, opts) {
  opts = assign({}, config.defaultOpts, opts)
  debug('compile', opts, ast)
  var worker = makeWorker(opts)
  for (var i = 0, text = ast.value, len = text.length; i < len; i++) {
    compileLine(text[i], worker)
  }
  return worker.buf.join('')
}
function compile ( ast , opts ) { opts = assign ( { } , config . defaultOpts , opts ) debug ( 'compile' , opts , ast ) var worker = makeWorker ( opts ) for ( var i = 0 , text = ast . value , len = text . length ; i < len ; i ++ ) { compileLine ( text [ i ] , worker ) } return worker . buf . join ( '' ) }
Compile parsed MML-document into HTML.
@param {object} ast Parsed WPML document
@param {object} opts Same as opts in mml.doc
@return{ string} Generated html string.
Compile parsed MML - document into HTML .