mirror of
https://github.com/python/cpython.git
synced 2024-11-26 11:24:40 +08:00
get_chapter_id(): Separate two aspects of string replacement to allow the
need for each to vary independently.
This commit is contained in:
parent
f54556efae
commit
45f2601cf3
@ -883,7 +883,8 @@ require SynopsisTable;
|
||||
|
||||
sub get_chapter_id(){
|
||||
my $id = do_cmd_thechapter('');
|
||||
$id =~ s/<SPAN CLASS="arabic">(\d+)<\/SPAN>\./\1/;
|
||||
$id =~ s/<SPAN CLASS="arabic">(\d+)<\/SPAN>/\1/;
|
||||
$id =~ s/\.//;
|
||||
return $id;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user