ajwillia-ms pushed a commit to branch master. http://git.enlightenment.org/website/www.git/commit/?id=3b012988948ea30358a4e85171bdbf7cf4259845
commit 3b012988948ea30358a4e85171bdbf7cf4259845 Author: Andy Williams <a...@andywilliams.me> Date: Thu Apr 30 23:59:46 2015 +0100 www plugins: Add clear plugin for css clear:both inserts --- public_html/lib/plugins/clear/syntax.php | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/public_html/lib/plugins/clear/syntax.php b/public_html/lib/plugins/clear/syntax.php new file mode 100644 index 0000000..d76471e --- /dev/null +++ b/public_html/lib/plugins/clear/syntax.php @@ -0,0 +1,38 @@ +<?php +/** + * Clear plugin + * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * @author Ikuo Obataya<i.obat...@gmail.com> + */ +if(!defined('DOKU_INC')) die(); +if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); +require_once(DOKU_PLUGIN.'syntax.php'); + +class syntax_plugin_clear extends DokuWiki_Syntax_Plugin { + var $boxmode = 'left'; + function getInfo(){ + return array( + 'author' => 'Ikuo Obataya', + 'email' => 'ikuo_obat...@symplus.co.jp', + 'date' => '2007-08-6', + 'name' => 'Clear plugin', + 'desc' => 'Clears the alignments of div sections', + 'url' => 'http://wiki.symplus.co.jp/computer/en/clear_plugin', + ); + } + function getType() { return 'substition'; } + function getSort() { return 32; } + + function connectTo($mode) { + $this->Lexer->addSpecialPattern('<clear/>',$mode,'plugin_clear'); + } + function handle($match, $state, $pos, &$handler){ return array($match, $state, $pos); } + function render($mode, &$renderer, $data) { + if($mode == 'xhtml'){ + $renderer->doc .= "<div style='clear:both;'></div>"; + return true; + } + return false; + } +} --