From b06b2f21c841b007ef563a146881fd6a6dbb7f44 Mon Sep 17 00:00:00 2001 From: wolf Date: Mon, 5 Nov 2001 08:44:53 +0000 Subject: [PATCH] Slight updates and fixes. git-svn-id: https://svn.dealii.org/trunk@5180 0785d39b-7218-0410-832d-ea1e28bc413d --- .../doc/tutorial/chapter-2.step-by-step/program2html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/program2html b/deal.II/doc/tutorial/chapter-2.step-by-step/program2html index 41c836f8b3..0b7cc35b5e 100644 --- a/deal.II/doc/tutorial/chapter-2.step-by-step/program2html +++ b/deal.II/doc/tutorial/chapter-2.step-by-step/program2html @@ -46,14 +46,16 @@ while (<>) { { # in comment mode: first skip leading whitespace and # comment // signs - s!\s*//\s*(.*)!$1!; + s!\s*//\s*(.*)\n!$1!; # second, replace section headers, and generate addressable # anchor - s!\@sect(\d)\{(.*)\}\s*$!$2!g; - $sect_name = $2; - $sect_name =~ s/\s/_/g; - $_ = "\n" . $_; + if ( /\@sect/ ) { + s!\@sect(\d)\{(.*)\}\s*$!$2!g; + $sect_name = $2; + $sect_name =~ s/\s/_/g; + $_ = "\n" . $_; + } # finally print this line print $_, "\n"; -- 2.39.5