<span style="font-family: courier;"><br>I'm trying to add a style= key/value argument to a directive, and having a problem with ParseArgs not working as I expect.</span><br style="font-family: courier;"><br style="font-family: courier;"><span style="font-family: courier;">I tried my sample syntax at Cookbook/ParseArgs#demo and it seemed to parse it just fine. However, it doesn't work in my code. I just updated my PmWiki from SVN (rev 1582) and it still doesn't work.</span><br style="font-family: courier;"><br style="font-family: courier;"><span style="font-family: courier;">Specifically, I have a directive that I define as</span><br style="font-family: courier;"><br style="font-family: courier;"><span style="font-family: courier;"> Markup( 'hrule', 'directives', '/\\(:hr (.*?):\\)/e', "Keep(Hrule('$1'))" );</span><br style="font-family: courier;"><br style="font-family: courier;"><span style="font-family: courier;"> function Hrule( $args ) </span><br
style="font-family: courier;"><span style="font-family: courier;"> {<br> // debug output<br> print "<pre>";</span><br style="font-family: courier;"><span style="font-family: courier;"> print_r( $args );</span><br style="font-family: courier;"><span style="font-family: courier;"> print "</pre>\n";</span><br style="font-family: courier;"><span style="font-family: courier;"> </span><br style="font-family: courier;"><span style="font-family: courier;"> $args = ParseArgs( $args );</span><br style="font-family: courier;"><span style="font-family: courier;"> <br> // debug output<br> print "<pre>";</span><br style="font-family: courier;"><span style="font-family: courier;"> print_r( $args );</span><br
style="font-family: courier;"><span style="font-family: courier;"> print "</pre>\n";</span><br style="font-family: courier;"><br style="font-family: courier;"><span style="font-family: courier;"> ....</span><br style="font-family: courier;"><br style="font-family: courier;"><span style="font-family: courier;">When I enter </span><br style="font-family: courier;"><br style="font-family: courier;"><span style="font-family: courier;"> (:hr style="height: 1px; width: 1px;":)<br><br>I see this debug output:<br><br> style=\"height: 1px; width: 1px;\"<br><br> Array<br> (<br> [#] => Array<br> (<br> [0] => style<br> [1] =>
\"height:<br> [2] => <br> [3] => 1px;<br> [4] => width<br> [5] => width:<br> [6] => <br> [7] => 1px;\"<br> )<br><br> [style] => \"height:<br> [] => Array<br> (<br> [0] => 1px;<br> [1] => 1px;\"<br> )<br><br> [width] => width:<br>
)<br><br>However, when I enter<br><br> style="height: 1px; width: 2px;"<br><br>into the ParseArgs field at http://www.pmwiki.org/wiki/Cookbook/ParseArgs#demo and click the ParseArgs button, I see:<br><br> Key Value(s)<br> --------- --------<br> $arg['#'] (array) 'style' 'height: 1px; width: 2px;'<br> $arg['style'] 'height: 1px; width: 2px;'<br><br>What am I doing wrong or differently than whatever the ParseArgs button on pmwiki.org is doing?<br><br>--Tony<br></span><br style="font-family: courier;"><BR><BR>~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~<br>Whenever a theory appears to you as the only possible one,<br>take this as a sign that you have neither understood the theory<br>nor the problem which it was intended to solve. -- Karl Popper<br>~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~<br>HOME PAGE:
www.awcfamily.com<br><br>I have no control over anything that appears after this sentence.<p> 
                <hr size=1>How low will we go? Check out Yahoo! Messenger’s low <a href="http://us.rd.yahoo.com/mail_us/taglines/postman8/*http://us.rd.yahoo.com/evt=39663/*http://voice.yahoo.com"> PC-to-Phone call rates.