Author: locilka Date: Fri Aug 8 12:59:18 2008 New Revision: 49862 URL: http://svn.opensuse.org/viewcvs/yast?rev=49862&view=rev Log: - Fixed ydoc2 to generate builtin/widget description even if there is no empty line between description and the following tag (adding newlines between all known tags before parsing). Modified: trunk/devtools/package/yast2-devtools.changes trunk/devtools/ydoc/src/ydoc2 Modified: trunk/devtools/package/yast2-devtools.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/devtools/package/yast2-devtools.changes?rev=49862&r1=49861&r2=49862&view=diff ============================================================================== --- trunk/devtools/package/yast2-devtools.changes (original) +++ trunk/devtools/package/yast2-devtools.changes Fri Aug 8 12:59:18 2008 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Fri Aug 8 12:57:22 CEST 2008 - locilka@suse.cz + +- Fixed ydoc2 to generate builtin/widget description even if there + is no empty line between description and the following tag + (adding newlines between all known tags before parsing). + +------------------------------------------------------------------- Mon Aug 4 14:55:49 CEST 2008 - locilka@suse.cz - Generating better XML (Authors section) to be easier-to-process Modified: trunk/devtools/ydoc/src/ydoc2 URL: http://svn.opensuse.org/viewcvs/yast/trunk/devtools/ydoc/src/ydoc2?rev=49862&r1=49861&r2=49862&view=diff ============================================================================== --- trunk/devtools/ydoc/src/ydoc2 (original) +++ trunk/devtools/ydoc/src/ydoc2 Fri Aug 8 12:59:18 2008 @@ -192,7 +192,19 @@ my ($pre, $post); - foreach my $line (@comments) + # add newlines before all tags + # multiline tags then can be proceeded one by one + # even more descriptions or examples can be supported + my @new_comments = (); + foreach my $line (@comments) { + if ($line =~ /^[ \t]*\@(note|description|example|examples|arg|optarg|param|builtin|widget|widgets|return|returns|id|since|class|short|usage|deprecated)( |\t|$)/) { + push @new_comments, "\n"; + } + push @new_comments, $line; + } + push @new_comments, "\n"; + + foreach my $line (@new_comments) { my $empty_line = $line; $empty_line =~ s/\s+//; @@ -206,7 +218,7 @@ { $keepformat = 0; } - + if($line =~ /\@(param|arg)\s+(.*)/o) { $lastwas = "param"; @@ -389,6 +401,8 @@ $entry->{"deprecated"} .= "magicnumber"; } } + + # continues on next line elsif($lastwas eq "optargs") { $lastwas = "optargs"; @@ -542,7 +556,6 @@ } elsif($lastwas eq "note") { - $lastwas = "note"; if ($empty_line eq "") { if ($para ne "") @@ -568,7 +581,6 @@ } elsif($lastwas eq "short" || $lastwas eq "description") { - $lastwas = "description"; if ($empty_line eq "") { if ($para ne "") @@ -601,8 +613,6 @@ } } - - push @{$entry->{"description"}}, @description; push @{$entry->{"note"}}, @note; push @{$entry->{"examples"}}, @examples; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org