OSDN Git Service

Import current code.
[osdn-codes/wiki-parser.git] / sfjp / wiki / plugin / br.php
1 <?php
2 namespace sfjp\Wiki\Plugin;
3 use sfjp\Wiki\Exception\Plugin_Error;
4 class Br extends Base {
5         public $is_vary = false;
6         public function process($args) {
7                 $opt = '';
8                 if (isset($args[0]) && !empty($args[0])) {
9                         list ($key, $val) = explode('=', strtolower(trim($args[0])));
10                         if ($key == "clear" && ($val == 'left' || $val == 'all' || $val == 'right')) {
11                                 $opt = " clear=\"${val}\"";
12                         }
13                 }
14                 return $this->getFormatter()->open_element('newline');
15         }
16 }