lib/textblock.js
function splitIntoSlabs(str) {
  var slabs = str.split('<!-- TEXTBLOCK -->');
  return slabs.map(function(val, index, array) {
    if (index % 2 == 1) {
      var rawAttr = val.match(/<code>(.*)<\/code>/);
      var attrs = JSON.parse(decodeURI(rawAttr[1]));
      return attrs;
    } else {
      return val;
    }
  });
}
function splitIntoSlabs(str) {
  var slabs = str.split('<!-- TEXTBLOCK -->');
  return slabs.map(function(val, index, array) {
    if (index % 2 == 1) {
      var rawAttr = val.match(/<code>(.*)<\/code>/);
      var attrs = JSON.parse(decodeURI(rawAttr[1]));
      return attrs;
    } else {
      return val;
    }
  });
}
function splitIntoSlabs ( str ) { var slabs = str . split ( '<!-- TEXTBLOCK -->' ) ; return slabs . map ( function ( val , index , array ) { if ( index % 2 == 1 ) { var rawAttr = val . match ( / <code>(.*)<\/code> / ) ; var attrs = JSON . parse ( decodeURI ( rawAttr [ 1 ] ) ) ; return attrs ; } else { return val ; } } ) ; }
Split into slabs, undoing the placeholders created in generatePlaceholder
@param {String} str The string to convert back to slabs
@return {Array} Slabs that have been broken out
Split into slabs undoing the placeholders created in generatePlaceholder