derlin / bitdowntoc

Online and command-line Markdown TOC generator, with built-in support for BitBucket Server, GitHub, Gitlab, dev.to and more!
https://bitdowntoc.derlin.ch
Other
92 stars 8 forks source link

Doesn't support languages #58

Open OnkelTem opened 2 months ago

OnkelTem commented 2 months ago

It doesn't seem to support languages.

When I pass it Russian headers in the Gitlab mode, it converts them to empty strings.

# Раз
## Два
### Три

should generate:

<!-- TOC start (generated with https://github.com/derlin/bitdowntoc) -->

- [Раз](#раз)
   * [Два](#два)
      + [Три](#три)

<!-- TOC end -->

but instead it produces this:

<!-- TOC start (generated with https://github.com/derlin/bitdowntoc) -->

- [Раз](#)
   * [Два](#-1)
      + [Три](#-2)

<!-- TOC end -->

I was using the online converter here: https://derlin.github.io/bitdowntoc/

image

derlin commented 2 months ago

Hello @OnkelTem and thank you for the report!

It is actually a known limitation, as stated at the top of the README:

It supports English, French, and most Latin languages, but not Cyrillic or Chinese!

If people are interested, this could definitely be added to the feature list. The only tricky part about non-latin languages is the handling of emojis.

Let me know if anyone is interested in helping on this!