Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'list' => array(
- 'type' => TT_CALLBACK, 'args' => 1,
- 'func' => function($arg) {
- $bullets = array(
- 'o' => 'circle', 'O' => 'circle', '0' => 'circle',
- '*' => 'disc', '@' => 'disc',
- '+' => 'square', 'x' => 'square', '#' => 'square'
- );
- $points = preg_split('/\[([oO0*@+x])\]/', $arg, -1, PREG_SPLIT_DELIM_CAPTURE);
- if (count($points) < 3)
- $type = 'disc';
- else
- $type = $bullets[$points[1]];
- $res = "<ul type=\"$type\">";
- for ($i = (trim($points[0]) == false? 2 : 0); $i < count($points); $i += 2)
- $res .= '<li>' . $points[$i] . '</li>';
- $res .= '</ul>';
- return $res;
- }
- ),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement