? escaped-at-213120-1.patch
Index: parser.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/api/parser.inc,v
retrieving revision 1.24.2.13
diff -u -p -r1.24.2.13 parser.inc
--- parser.inc	16 Nov 2007 19:56:52 -0000	1.24.2.13
+++ parser.inc	23 Jan 2008 03:04:31 -0000
@@ -58,6 +58,8 @@ function api_parse_file($file_path, $bra
  */
 function api_parse_text_file($file_path, $branch_name, $file_name) {
   $source = file_get_contents($file_path);
+  // Convert escaped @ symbols
+  $source = str_replace("\\@", "[api-escaped-at]", $source);
 
   $docblock_matches = array();
   $docblocks = array();
@@ -104,6 +106,8 @@ function api_parse_text_file($file_path,
  */
 function api_parse_html_file($file_path, $branch_name, $file_name) {
   $source = file_get_contents($file_path);
+  // Convert escaped @ symbols
+  $source = str_replace("\\@", "[api-escaped-at]", $source);
 
   $docblocks = array();
 
@@ -164,6 +168,8 @@ function api_parse_php_file($file_path, 
   // Convert Mac/Win line breaks to Unix format.
   $source = str_replace("\r\n", "\n", $source);
   $source = str_replace("\r", "\n", $source);
+  // Convert escaped @ symbols
+  $source = str_replace("\\@", "[api-escaped-at]", $source);
 
   $docblock_matches = array();
   $docblocks = array();
@@ -418,6 +424,11 @@ function api_parse_php_file($file_path, 
  *   The documentation ID of the inserted/updated construct.
  */
 function api_save_documentation(&$docblock) {
+  // Convert back escaped @ symbols
+  $docblock['summary'] = str_replace("[api-escaped-at]", "@", $docblock['summary']);
+  $docblock['documentation'] = str_replace("[api-escaped-at]", "@", $docblock['documentation']);
+  $docblock['code'] = str_replace("[api-escaped-at]", "@", $docblock['code']);
+
   $result = db_query("SELECT did FROM {api_documentation} WHERE object_name = '%s' AND branch_name = '%s' AND object_type = '%s'", $docblock['object_name'], $docblock['branch_name'], $docblock['object_type']);
   if (db_num_rows($result) > 0) {
     $did = db_result($result);
