<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,30 +1,47 @@
 &lt;?php
-// PukiWiki - Yet another WikiWikiWeb clone.
-// $Id: size.inc.php,v 1.10 2005/06/16 15:04:08 henoheno Exp $
-//
-// Text-size changing via CSS plugin
+// http://github.com/toooooooby/pukiwiki-size_em-plugin/
 
-define('PLUGIN_SIZE_EM_MAX', 5); // px
-define('PLUGIN_SIZE_EM_MIN',  0.1); // px
+define('PLUGIN_SIZE_EM_MAX', 5); // em
+define('PLUGIN_SIZE_EM_MIN',  0.1); // em
 
 // ----
-define('PLUGIN_SIZE_EM_USAGE', '&amp;size_em(em){Text you want to change};');
+define('PLUGIN_SIZE_EM_USAGE', 'size_em.inc.php usage: &amp;size_em(em){Text you want to change};');
+define('PLUGIN_SIZE_EM_CONVERT_USAGE', &quot;size_em.inc.php usage: #size_em(em){{&lt;/br&gt;\nText you want to change&lt;/br&gt;\n}}&lt;/br&gt;\n&quot;);
 
-function plugin_size_em_inline()
+function _plugin_size_em_get_args($func_get_args)
 {
-	if (func_num_args() != 2) return PLUGIN_SIZE_EM_USAGE;
+  $func_num_args = count($func_get_args);
+  if ($func_num_args != 2) return array(FALSE, &quot;&quot;, &quot;&quot;);
+  
+  list($size, $body) = $func_get_args;
+  if ($size == '' || $body == '' || ! preg_match('/^\d+$/', $size))
+      return array(FALSE, &quot;&quot;, &quot;&quot;);
+  $size = max(PLUGIN_SIZE_EM_MIN, min(PLUGIN_SIZE_EM_MAX, $size));
+  return array(TRUE, $size, $body);
+}
 
-	list($size, $body) = func_get_args();
 
-	// strip_autolink() is not needed for size plugin
-	//$body = strip_htmltag($body);
-	
-	if ($size == '' || $body == '' || ! preg_match('/^\d+$/', $size))
-		return PLUGIN_SIZE_EM_USAGE;
+function plugin_size_em_inline()
+{
+  $func_get_args = func_get_args();
+  list($result, $size, $body) = _plugin_size_em_get_args($func_get_args);
+  if ($result) {
+    return '&lt;span style=&quot;font-size:' . $size .
+      'em;display:inline-block;line-height:100%;text-indent:0px&quot;&gt;' .
+      $body . '&lt;/span&gt;';
+  } else {
+    return PLUGIN_SIZE_EM_USAGE;
+  }
+}
 
-	$size = max(PLUGIN_SIZE_EM_MIN, min(PLUGIN_SIZE_EM_MAX, $size));
-	return '&lt;span style=&quot;font-size:' . $size .
-		'em;display:inline-block;line-height:100%;text-indent:0px&quot;&gt;' .
-		$body . '&lt;/span&gt;';
+function plugin_size_em_convert()
+{
+  $func_get_args = func_get_args();
+  list($result, $size, $body) = _plugin_size_em_get_args($func_get_args);
+  if ($result) {
+    return '&lt;div style=&quot;font-size:' . $size . '&quot;&gt;' . $body . '&lt;/div&gt;';
+  } else {
+    return PLUGIN_SIZE_EM_CONVERT_USAGE;
+  }
 }
-?&gt;
+?&gt;
\ No newline at end of file</diff>
      <filename>size_em.inc.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8518707a8aff0d97899746dcabc8d2bcb58f2d6e</id>
    </parent>
  </parents>
  <author>
    <name>toooooooby</name>
    <email>toby.net.info.mail+git@gmail.com</email>
  </author>
  <url>http://github.com/toooooooby/pukiwiki-size_em-plugin/commit/e1009b944ba51d360d33f99811c7b1c29729a6a3</url>
  <id>e1009b944ba51d360d33f99811c7b1c29729a6a3</id>
  <committed-date>2009-10-03T21:01:18-07:00</committed-date>
  <authored-date>2009-10-03T21:01:18-07:00</authored-date>
  <message>implemented multi block(_convert)</message>
  <tree>e8bc079c1a9c25f7fb1447ac6d39c1464a763e9b</tree>
  <committer>
    <name>toooooooby</name>
    <email>toby.net.info.mail+git@gmail.com</email>
  </committer>
</commit>
