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

Skip to content

Commit 45f2601

Browse files
committed
get_chapter_id(): Separate two aspects of string replacement to allow the
need for each to vary independently.
1 parent f54556e commit 45f2601

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Doc/perl/python.perl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,8 @@ sub do_cmd_maketitle {
883883

884884
sub get_chapter_id(){
885885
my $id = do_cmd_thechapter('');
886-
$id =~ s/<SPAN CLASS="arabic">(\d+)<\/SPAN>\./\1/;
886+
$id =~ s/<SPAN CLASS="arabic">(\d+)<\/SPAN>/\1/;
887+
$id =~ s/\.//;
887888
return $id;
888889
}
889890

0 commit comments

Comments
 (0)