Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f06b905

Browse files
committed
Remove section number from the title for use in the
<meta name='description' ...> element in the document head.
1 parent 0e85f9d commit f06b905

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Doc/perl/l2hinit.perl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,9 +663,14 @@ ($$)
663663
$charset = $CHARSET;
664664
$charset =~ s/_/\-/go;
665665
}
666+
# Remove section number from the title for use in the
667+
# <meta name='description' ...> element in the document head.
668+
my $metatitle = "$title";
669+
$metatitle =~ s/^\d+(\.\d+)*\s*//;
670+
666671
join('',
667672
$MY_PARTIAL_HEADER,
668-
&meta_information($title),
673+
&meta_information($metatitle),
669674
"<title>", $title, "</title>\n</head>\n<body$body>");
670675
}
671676

0 commit comments

Comments
 (0)