Add ability to generate stable heading id for non english languages by setting myst_fully_normalize_name_slug_func by Alexey-NM · Pull Request #1019 · executablebooks/MyST-Parser
They need stable heading id to make refrences to headers from external documentation (some_chapter.html#zagalovok).
Unfortunately If there are titles 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.
This merge request allows to generate stable ids by setting myst_fully_normalize_name_slug_func in config.py
myst_fully_normalize_name_slug_func = 'utils.fully_normalize_name_by_any_lang'
def fully_normalize_name_by_any_lang(str:str)->str:
normalize_name = ' '.join(str.lower().split())
tr_str = translit(normalize_name,"ru",reversed=True)
result = _make_id(tr_str)
return result
It generates an english name from other language. It allows to use static id.
See also: #968 (comment)