diff options
author | José Alburquerque <jaalburqu@svn.gnome.org> | 2011-10-25 17:08:54 -0400 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2011-10-26 09:34:20 +0200 |
commit | fabaf0ff4f93d530a0c45d10426f8b635e201daf (patch) | |
tree | 98f2348891bc3e02d6b74ee4cf289a0bb541e356 | |
parent | 8e8f46506a11d6fed6e3c42a69277d4b24ac8f40 (diff) | |
download | glibmm-fabaf0ff4f93d530a0c45d10426f8b635e201daf.tar.gz |
gmmproc: Don't include C code examples found in the XML docs.
* tools/pm/DocsParser.pm (lookup_documentation): Remove the C example
code from the attained documentation of the specified function. Print
a warning that the example code has been removed if that is the
case. Include the function name in the warning so that it is known
where the examples are in case it is convenient to translate them.
(convert_tags_to_doxygen): No longer convert tags and symbols that
signal example code to Doxygen format since they are removed with the
example code.
Bug #650544
-rw-r--r-- | ChangeLog | 15 | ||||
-rw-r--r-- | tools/pm/DocsParser.pm | 12 |
2 files changed, 25 insertions, 2 deletions
@@ -1,3 +1,18 @@ +2011-10-25 José Alburquerque <jaalburqu@svn.gnome.org> + + gmmproc: Don't include C code examples found in the XML docs. + + * tools/pm/DocsParser.pm (lookup_documentation): Remove the C example + code from the attained documentation of the specified function. Print + a warning that the example code has been removed if that is the + case. Include the function name in the warning so that it is known + where the examples are in case it is convenient to translate them. + (convert_tags_to_doxygen): No longer convert tags and symbols that + signal example code to Doxygen format since they are removed with the + example code. + + Bug #650544 + 2011-10-25 Murray Cumming <murrayc@murrayc.com> giomm/wrap_init.h: Remove the glibmm.h include from here too. diff --git a/tools/pm/DocsParser.pm b/tools/pm/DocsParser.pm index 1a0b6044..49007931 100644 --- a/tools/pm/DocsParser.pm +++ b/tools/pm/DocsParser.pm @@ -264,6 +264,15 @@ sub lookup_documentation($$) # Escape the space after "i.e." or "e.g." in the brief description. $text =~ s/^([^.]*\b(?:i\.e\.|e\.g\.))\s/$1\\ /; + # Remove C example code. + my $example_removals = + ($text =~ s"<informalexample>.*?</informalexample>""sg); + + $example_removals += ($text =~ s"\|\[.*?]\|""sg); + + print STDERR "gmmproc: $functionName(): Example code discarded.\n" + if ($example_removals); + # Convert to Doxygen-style comment. $text =~ s/\n/\n${DocsParser::commentMiddleStart}/g; $text = $DocsParser::commentStart . $text; @@ -374,8 +383,7 @@ sub convert_tags_to_doxygen($) s"^Note ?\d?: "\@note "mg; s"</?programlisting>""g; - s"<informalexample>|\|\["\@code"g; - s"</informalexample>|]\|"\@endcode"g; + s"<!>""g; # Remove all link tags. |