gtk-doc r586 - in trunk: . tools
- From: stefkost svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk-doc r586 - in trunk: . tools
- Date: Sat, 21 Jun 2008 17:49:45 +0000 (UTC)
Author: stefkost
Date: Sat Jun 21 17:49:45 2008
New Revision: 586
URL: http://svn.gnome.org/viewvc/gtk-doc?rev=586&view=rev
Log:
* gtkdoc-mkdb.in:
Commenting.
* tools/migratetmpl.pl:
Convert character entities back.
Modified:
trunk/ChangeLog
trunk/gtkdoc-mkdb.in
trunk/tools/migratetmpl.pl
Modified: trunk/gtkdoc-mkdb.in
==============================================================================
--- trunk/gtkdoc-mkdb.in (original)
+++ trunk/gtkdoc-mkdb.in Sat Jun 21 17:49:45 2008
@@ -1952,8 +1952,8 @@
# If we're not in CDATA convert to entities.
# We could handle <programlisting> differently, though I'm not sure it helps.
if ($tag eq "") {
+ # replace only if its not a tag
$text =~ s/&(?![a-zA-Z#]+;)/&/g; # Do this first, or the others get messed up.
-# $text =~ s/&/&/g; # Do this first, or the others get messed up.
$text =~ s/<(?![a-zA-Z\/!])/</g;
$text =~ s/(?<![a-zA-Z0-9"'\/-])>/>/g;
Modified: trunk/tools/migratetmpl.pl
==============================================================================
--- trunk/tools/migratetmpl.pl (original)
+++ trunk/tools/migratetmpl.pl Sat Jun 21 17:49:45 2008
@@ -282,13 +282,13 @@
}
if (defined ($SymbolDocs{"$TMPL_DIR/$file:Long_Description"})) {
$long_desc = $SymbolDocs{"$TMPL_DIR/$file:Long_Description"};
- $long_desc = &ConvertNewlines ($long_desc);
+ $long_desc = &ConvertMarkup ($long_desc);
$long_desc = &ConvertComments ($long_desc);
delete $SymbolDocs{"$TMPL_DIR/$file:Long_Description"};
}
if (defined ($SymbolDocs{"$TMPL_DIR/$file:See_Also"})) {
$see_also = $SymbolDocs{"$TMPL_DIR/$file:See_Also"};
- $see_also = &ConvertNewlines ($see_also);
+ $see_also = &ConvertMarkup ($see_also);
delete $SymbolDocs{"$TMPL_DIR/$file:See_Also"};
}
if (defined ($SymbolDocs{"$TMPL_DIR/$file:Stability_Level"})) {
@@ -363,7 +363,7 @@
($since, undef) = split (/\n/,$Since{$symbol});
}
$long_desc = $SymbolDocs{$symbol};
- $long_desc = &ConvertNewlines ($long_desc);
+ $long_desc = &ConvertMarkup ($long_desc);
$long_desc = &ConvertComments ($long_desc);
$str=<<EOF;
@@ -434,11 +434,11 @@
}
#############################################################################
-# Function : ConvertNewlines
-# Description : Convert para tags to newlines
+# Function : ConvertMarkup
+# Description : Convert para tags to newlines and character entities back
# Arguments : $istr - string to convert
#############################################################################
-sub ConvertNewlines {
+sub ConvertMarkup {
my ($istr) = @_;
my ($line,$ostr);
@@ -449,6 +449,11 @@
} elsif ($line =~ m/<\/para>\s*$/) {
$ostr.="\n";
} else {
+ # convert character entities back.
+ $line =~ s/&/&/g;
+ $line =~ s/#/#/g;
+ $line =~ s/</</g;
+ $line =~ s/>/>/g;
$ostr.="$line\n";
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]