naokazuterada / MarkdownTOC

SublimeText3 plugin which generate a table of contents (TOC) in a markdown document.
https://packagecontrol.io/packages/MarkdownTOC
MIT License
301 stars 48 forks source link

Lowercase non-latin chars breaks links in TOC on GitHub #72

Closed lahmatiy closed 8 years ago

lahmatiy commented 8 years ago

Currently plugin lowercases all chars. But GitHub lowercase latin chars only. Therefore links in TOC don't work if they contains non-latin chars.

Test case:

## Пример Example

Expected TOC

<!-- MarkdownTOC -->

- [Пример Example](#Пример-example)

<!-- /MarkdownTOC -->

Actual

<!-- MarkdownTOC -->

- [Пример Example](#пример-example) <!-- broken link

<!-- /MarkdownTOC -->

It would be nice to fix it, or new option to setup behaviour – "lowercase_non_latin": true/false.

naokazuterada commented 8 years ago

Hi, @lahmatiy

Thank you for your suggestion.I didn't notice it until your report.

I add new feature in 2.1.0

Now you can make it possible by add "default_lowercase_only_ascii": false to your MarkdownTOC.sublime-settings or just add lowercase_only_ascii=true to TOC tag in your document.

See it on README.

naokazuterada commented 8 years ago

Hi, @jonasbn

I updated README. Would you mind to confirm it?

lahmatiy commented 8 years ago

@naokazuterada Just tried updated plugin. Everything ok now with new setting. Thanks a lot!