2 // PukiWiki - Yet another WikiWikiWeb clone.
3 // $Id: ruby.inc.php,v 1.5 2005/01/04 14:25:24 henoheno Exp $
5 // Ruby annotation plugin: Add a pronounciation into kanji-word or acronym(s)
6 // See also about ruby: http://www.w3.org/TR/ruby/
9 // Ruby tag works with MSIE only now,
10 // but readable for other browsers like: 'words(pronunciation)'
12 define('PLUGIN_RUBY_USAGE', '&ruby(pronunciation){words};');
14 function plugin_ruby_inline()
16 if (func_num_args() != 2) return PLUGIN_RUBY_USAGE;
18 list($ruby, $body) = func_get_args();
19 if ($ruby == '' || $body == '') return PLUGIN_RUBY_USAGE;
21 return '<ruby><rb>' . $body . '</rb>' . '<rp>(</rp>' .
22 '<rt>' . htmlspecialchars($ruby) . '</rt>' . '<rp>)</rp>' .