Re: documentation bugs



Alper Ersoy:
> Ok, with this patch, scandocs.pl will try to escape commas in @ref*
> macro parameters.

I mean, with _this_ patch.  Sorry.

-- 
Alper Ersoy
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/beast/ChangeLog,v
retrieving revision 1.282
diff -u -p -r1.282 ChangeLog
--- ChangeLog	1 Apr 2003 05:48:19 -0000	1.282
+++ ChangeLog	5 Apr 2003 22:06:34 -0000
@@ -1,3 +1,7 @@
+Sun Apr  6 00:55:08 2003  Alper Ersoy  <dirt@gtk.org>
+
+	* docs/generated/scandocs.pl: escape commas in macro parameters.
+
 Tue Apr  1 06:45:33 2003  Tim Janik  <timj@gtk.org>
 
 	* beast-gtk/bstdefs.h: removed BST_TOOLTIPS, changed code to make
Index: docs/generated/scandocs.pl
===================================================================
RCS file: /cvs/gnome/beast/docs/generated/scandocs.pl,v
retrieving revision 1.13
diff -u -p -r1.13 scandocs.pl
--- docs/generated/scandocs.pl	21 Feb 2003 18:12:48 -0000	1.13
+++ docs/generated/scandocs.pl	5 Apr 2003 22:06:45 -0000
@@ -207,6 +207,8 @@ sub tags_highlight {
     # A constant
     $t =~ s/  % ( $ident ) /\@refConstant{$1}/gx;
 
+    $t =~ s/(\@ref[^{]+){([^}]+)}/$1 . '{' . fix_commas($2) . '}'/ge;
+
     return $t;
 }
 sub tags_print_description {
@@ -254,6 +256,14 @@ sub sort_items {
     return unless ref($list) eq 'ARRAY';
 
     @{$list} = sort { ${$a}{name} cmp ${$b}{name} } @{$list};
+}
+sub fix_commas {
+    my $t = shift;
+    return unless defined $t;
+
+    $t =~ s/,/\\\\,/g;
+
+    return $t;
 }
 
 sort_items(\@records);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]