File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 22import hashlib
33import logging
44import re
5+ from docutils .nodes import make_id
56from collections import defaultdict
67from dataclasses import dataclass , field
78from pathlib import Path , PurePath , PurePosixPath
@@ -57,11 +58,6 @@ def normalize_target(target: str) -> str:
5758 return re .sub (r"\s+" , " " , target ).lower ()
5859
5960
60- def get_html_id (target : str ) -> str :
61- """Return an HTML ID from a target name."""
62- return target .replace (" " , "_" )
63-
64-
6561class SnootyError (Exception ):
6662 pass
6763
@@ -233,7 +229,7 @@ def generate_inventory(self, base_url: str) -> intersphinx.Inventory:
233229 base_uri = uri
234230 if (domain , role_name ) != ("std" , "doc" ):
235231 base_uri += "#$"
236- uri = uri + "#" + get_html_id (name )
232+ uri = uri + "#" + make_id (name )
237233
238234 targets [key ] = intersphinx .TargetDefinition (
239235 definition .canonical_name ,
You can’t perform that action at this time.
0 commit comments