var tableFlattenBlocks = function(blocks) { var result = ""; blocks.forEach(function(b) { result += b; if (b.trailing) { result += b.trailing; } }); // bypass newline insertion return result.replace(/[\n\r]/g, " "); }; var emitter = function(contents) { // TODO event should be fired when sanitizer loads if (window.html4 && window.html4.ELEMENTS.td !== 1) { window.html4.ELEMENTS.table = 0; window.html4.ELEMENTS.tbody = 1; window.html4.ELEMENTS.td = 1; window.html4.ELEMENTS.thead = 1; window.html4.ELEMENTS.th = 1; window.html4.ELEMENTS.tr = 1; } return ['table', {"class": "md-table"}, tableFlattenBlocks.apply(this, [contents])]; }; var tableBlock = { start: /(