changed git call from https to git readonly
[atutor.git] / mods / wiki / plugins / markup / table_rowspan.php
1 <?php
2
3 /*
4    This markup extension, allows for following syntax to merge
5    neigboured table cells together:
6
7    | col1 | row2 | row3 |
8    | col2 || row2 and 3 |
9    ||| this occoupies the whole column |
10    | row1 | row2 | row3 |
11 */
12
13
14 $ewiki_plugins["format_final"][] = "evil_table_rowspan";
15 function evil_table_rowspan(&$html) {
16    $html = preg_replace(
17       '#(<td></td>\s*)+<td#e',
18       '"<td rowspan=\"" . (1+(int)(strlen("$1")/9)) . "\">"',
19       $html
20    );
21 }
22
23 ?>