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;AACL,CAAC;AACD,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;AACxB,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACpI,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;AACxB,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;AACvC,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAC5B,EAAE,CAAC,CAAC;AACJ,KAAK,CAAC","file":"table.min.js","sourcesContent":["/*global module:true*/\r\n/*\r\n * Basic table support with re-entrant parsing, where cell content\r\n * can also specify markdown.\r\n *\r\n * Tables\r\n * ======\r\n *\r\n * | Col 1 | Col 2 |\r\n * |======== |====================================================|\r\n * |**bold** | ![Valid XHTML] (http://w3.org/Icons/valid-xhtml10) |\r\n * | Plain | Value |\r\n *\r\n */\r\n\r\n(function(){\r\n var table = function(converter) {\r\n var tables = {}, style = 'text-align:left;', filter;\r\n tables.th = function(header){\r\n if (header.trim() === \"\") { return \"\";}\r\n var id = header.trim().replace(/ /g, '_').toLowerCase();\r\n return '' + header + '';\r\n };\r\n tables.td = function(cell) {\r\n return '' + converter.makeHtml(cell) + '';\r\n };\r\n tables.ths = function(){\r\n var out = \"\", i = 0, hs = [].slice.apply(arguments);\r\n for (i;i\\n\";\r\n out += \"\\n\";\r\n out += tables.ths.apply(this, hs);\r\n out += \"\\n\";\r\n out += \"\\n\";\r\n return out;\r\n };\r\n tables.tr = function() {\r\n var out, i = 0, cs = [].slice.apply(arguments);\r\n out = \"\\n\";\r\n out += tables.tds.apply(this, cs);\r\n out += \"\\n\";\r\n return out;\r\n };\r\n filter = function(text) {\r\n var i=0, lines = text.split('\\n'), line, hs, rows, out = [];\r\n for (i; i');\r\n hs = line.substring(1, line.length -1).split('|');\r\n tbl.push(tables.thead.apply(this, hs));\r\n line = lines[++i];\r\n if (!line.trim().match(/^[|]{1}[-=|: ]+[|]{1}$/)) {\r\n // not a table rolling back\r\n line = lines[--i];\r\n }\r\n else {\r\n line = lines[++i];\r\n tbl.push('');\r\n while (line.trim().match(/^[|]{1}.*[|]{1}$/)) {\r\n line = line.trim();\r\n tbl.push(tables.tr.apply(this, line.substring(1, line.length -1).split('|')));\r\n line = lines[++i];\r\n }\r\n tbl.push('');\r\n tbl.push('');\r\n // we are done with this table and we move along\r\n out.push(tbl.join('\\n'));\r\n continue;\r\n }\r\n }\r\n out.push(line);\r\n }\r\n return out.join('\\n');\r\n };\r\n return [\r\n {\r\n type: 'lang',\r\n filter: filter\r\n }\r\n ];\r\n };\r\n\r\n // Client-side export\r\n if (typeof window !== 'undefined' && window.Showdown && window.Showdown.extensions) { window.Showdown.extensions.table = table; }\r\n // Server-side export\r\n if (typeof module !== 'undefined') {\r\n module.exports = table;\r\n }\r\n}());\r\n"]}