? api-regexp.patch Index: api.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/api/api.module,v retrieving revision 1.23.2.8 diff -u -r1.23.2.8 api.module --- api.module 3 Dec 2006 01:54:10 -0000 1.23.2.8 +++ api.module 13 Dec 2006 04:07:16 -0000 @@ -792,8 +792,14 @@ */ function api_link_documentation($documentation, $branch_name) { // We do the replacement in two phases to avoid linking documentation within title attributes. + + // Match function names. $documentation = preg_replace('!([a-zA-Z0-9_]+)(\()!', '@@@$1@@@$2', $documentation); - $documentation = preg_replace('%(?[a-zA-Z0-9_]+)(?!["?/])%', '@@@$0@@@', $documentation); +echo $documentation; + // Generate the links. $documentation = preg_replace('!@@@([^@]*)@@@!e', 'api_link_name("$1", "'. $branch_name .'")', $documentation); return $documentation;