You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need ability to make refrences to headers from external documentation (some_chapter.html#zagalovok).
Unfortunately If I have a title in a non english language it will have numeric id which can be changed in any time.
It is difficult to automate and it is unstable because such number can be changed at any time.
<sectionid="id2">
Solution
I want to have the ablility to define the id generation function in my conf.py to a function that accepts a string and returns a stable id.
The function will generate stable id by a node title.
defmake_id_by_any_lang(str:str)->str:
# see https://pypi.org/project/transliterate/tr_str=translit(str,"ru",reversed=True)
#This function is a modified version of ``docutils.nodes.make_id()`` of#docutils-0.16# It is test code so probably it is not nessasaryresult=_make_id(tr_str).lower()
returnresult
Feature
I need ability to make refrences to headers from external documentation (some_chapter.html#zagalovok).
Unfortunately If I have a title in a non english language it will have numeric id which can be changed in any time.
It is difficult to automate and it is unstable because such number can be changed at any time.
Solution
I want to have the ablility to define the id generation function in my conf.py to a function that accepts a string and returns a stable id.
The function will generate stable id by a node title.
I have maken some test in the function generate_heading_target
It seems It is working.
Will it be accepted If I make a pull request?
The text was updated successfully, but these errors were encountered: