mirror of
https://github.com/python/cpython.git
synced 2025-07-23 19:25:40 +00: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
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue