Menu

Named link inside table

Help
Anonymous
2003-03-06
2012-10-11
  • Anonymous

    Anonymous - 2003-03-06

    I'd like to have a named link inside a table and used the following construct:

    <?plugin OldStyleTable
    | [link name | link URL ] | col2
    ?>

    It seems the pipe seperating link name from link URL is interpreted as cell boundary, leading to a confusing result.

    Any idea to improve that?
    Thanks!

     
    • Geoffrey T. Dairiki

      This has been fixed in the current CVS code.

      Either upgrade to that, or try this change:

      In lib/plugin/OldStyleTable.php, method _parse_row(), change:

         preg_match_all('/(|+)(v*)([<>^]?)\s*(.*?)\s*(?=||$)/',
                       $line, $matches, PREG_SET_ORDER);

      to

         $brkt_link = "\\[ .*? [^]\s] .*? \\]";
         $cell_content  = "(?: [^[] | ".ESCAPE_CHAR."\\[ | $brkt_link )*?";
         preg_match_all("/(\|+) (v*) ([<>^]?) \s* ($cell_content) \s* (?=\||\$)/x",
             $line, $matches, PREG_SET_ORDER);

      For a more readable diff, see
        http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpwiki/phpwiki/lib/plugin/OldStyleTable.php.diff?r1=1.6&r2=1.7

      Though that patch includes other changes which are probably inappropriate for older old.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.