mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
New solution to the "Someone stuck a colon in that filename!" problem:
Allow colons in the labels used for internal references, but do not expose them when generating filename.
This commit is contained in:
parent
96a2a80065
commit
9a374186fc
1 changed files with 10 additions and 3 deletions
|
@ -10,9 +10,16 @@ require "labels.pl";
|
|||
my $key;
|
||||
# sort so that we get a consistent assignment for nodes with multiple labels
|
||||
foreach $label (sort keys %external_labels) {
|
||||
$key = $external_labels{$label};
|
||||
$key =~ s|^/||;
|
||||
$nodes{$key} = $label;
|
||||
#
|
||||
# If the label can't be used as a filename on non-Unix platforms,
|
||||
# skip it. Such labels may be used internally within the documentation,
|
||||
# but will never be used for filename generation.
|
||||
#
|
||||
if ($label =~ /^([-.a-zA-Z0-9]+)$/) {
|
||||
$key = $external_labels{$label};
|
||||
$key =~ s|^/||;
|
||||
$nodes{$key} = $label;
|
||||
}
|
||||
}
|
||||
|
||||
# This adds the "internal" labels added for indexing. These labels will not
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue