From: Timo Heister Date: Fri, 31 Aug 2018 14:08:59 +0000 (-0400) Subject: doxygen: remove trailing // in tutorials X-Git-Tag: v9.1.0-rc1~761^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f975575c3be2a90270d71e07f3f839e59b54ef75;p=dealii.git doxygen: remove trailing // in tutorials We introduced "//" markers (see for example "shape_grad" lines in step-8) to force a specific formatting for clang-format. Make sure we don't output these markers to the tutorial pages. --- diff --git a/doc/doxygen/scripts/program2doxygen b/doc/doxygen/scripts/program2doxygen index 23c360f521..ffb36df9b8 100644 --- a/doc/doxygen/scripts/program2doxygen +++ b/doc/doxygen/scripts/program2doxygen @@ -37,13 +37,19 @@ $state = $comment_mode; print " * \n"; do { - # substitute tabs. also make sure that we don't output comment end - # markers that might confuse doxygen + + # Make sure that we don't output comment end markers that might confuse + # doxygen. s!/\*!/ \*!g; s!\*/!\* /!g; + # substitute tabs s/\t/ /g; + # Remove "//" if it is present at the end of a line. These comments exist + # to force a specific formatting of the line for clang-format. + s!//$!!g; + # We are entering code fragments if (($state != $code_fragment_mode) && m!^\s*//\s*\@code!) { diff --git a/doc/doxygen/scripts/program2plain b/doc/doxygen/scripts/program2plain index d267fa241c..a1912dbdcc 100644 --- a/doc/doxygen/scripts/program2plain +++ b/doc/doxygen/scripts/program2plain @@ -15,13 +15,17 @@ # Remove all comments from the source file -# The variable tracing whether we are inside a block comment +# The output of this script is used as the source for the "The plain program" +# block at the end of each tutorial. -my $block_comment = 0; while (<>) { - # Eliminate //-comment lines + # Eliminate comment lines starting with "//" next if (m!^\s*//!); + # Remove "//" if it is present at the end of a line. These comments exist + # to force a specific formatting of the line for clang-format + s!//$!!g; + # Otherwise print the line print; }