md.before(mdText) ) ) + '</div>'
}

//===== TOC support
md.toc = function (srcDiv, tocDiv, options ) {

  // select elements, set title
  var tocSelector = (options&&options.css) || 'h1,h2,h3,h4'
  var tocTitle = (options&&options.title) || 'Table of Contents'
  var toc = document.getElementById(srcDiv).querySelectorAll( tocSelector )
  var html = '<div class="toc"><ul>' + (tocTitle=='none'? '' : '<h3>' + tocTitle + '</h3>');
  
  // loop for each element,add <li> element with class in TAG name.
  for (var 