Cant generate ID if heading is other language in markdown
Yes, hope to solve this problem !

Agree,met with the same problem!
In Russian, a post with the name "袧邪蟹胁邪薪懈械" will be assigned the "/nazvaniie/" address (which is fine). It would be nice if the IDs were generated in the similar way as the post URL.
At the moment, IDs are empty or contain only English words, if they are present in the title.
A temporary way is to generate heading ids when opening the post with javascript, for example:
var contentSel = '.post-content-main' // depends on ghost theme
if(headings.length){
// todo: to avoid ghost bug: can't generate heading id if heading is other than English
for (var idx = 0 ; idx< headings.length; idx++){
var newId = headings[idx].innerHTML + '-' + Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)
headings[idx].setAttribute('id', newId)
}
}
Changing this line to var slug = inputString.toLowerCase(); or something will fix this but it will break links which uses characters outside \w.
The slug generation when not using markdown cards differs from it.
These are neither non-latin-characters-friendly. (For example 袧邪蟹胁邪薪懈械 becomes -)
In my opinion, the slug generation in this vscode's PR is good.
Markdown cards are the primary backwards compatibility mechanism for content from Ghost 0.x, we need to ensure the existing header id generation doesn't change so we don't break anchor links in legacy content. Similarly for the rich-text editor, changing the header id generation should not cause any changes for existing content.
What we can probably do is adapt the current id generation routines so that once an id is generated using the existing algorithm, if it's empty or only contains dashes then we can trigger a more non-latin-char friendly generator. Use of the @tryghost/string's slugify function may be useful there but I'd be interested to know of any approaches that perform better for non-latin languages.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
+1
Any updates on this?