? api-cleanurl.patch ? api-regexp.patch Index: api.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/api/api.module,v retrieving revision 1.39 diff -u -p -r1.39 api.module --- api.module 12 Mar 2007 00:54:51 -0000 1.39 +++ api.module 20 Apr 2007 21:43:58 -0000 @@ -1077,8 +1077,13 @@ function api_link_code($code, $branch_na */ 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); + // Generate the links. $documentation = preg_replace('!@@@([^@]*)@@@!e', 'api_link_name("$1", "'. $branch_name .'")', $documentation); return $documentation;