| 1329 | Markdown.dialects.Maruku.block.table = function table (block, next) { |
| 1330 | |
| 1331 | var _split_on_unescaped = function(s, ch) { |
| 1332 | ch = ch || '\\s'; |
| 1333 | if (ch.match(/^[\\|\[\]{}?*.+^$]$/)) { ch = '\\' + ch; } |
| 1334 | var res = [ ], |
| 1335 | r = new RegExp('^((?:\\\\.|[^\\\\' + ch + '])*)' + ch + '(.*)'), |
| 1336 | m; |
| 1337 | while(m = s.match(r)) { |
| 1338 | res.push(m[1]); |
| 1339 | s = m[2]; |
| 1340 | } |
| 1341 | res.push(s); |
| 1342 | return res; |
| 1343 | } |
| 1344 | |
| 1345 | var leading_pipe = /^ {0,3}\|(.+)\n {0,3}\|\s*([\-:]+[\-| :]*)\n((?:\s*\|.*(?:\n|$))*)(?=\n|$)/, |
| 1346 | // find at least an unescaped pipe in each line |