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

Is that possible to number the markdown's header #91

Closed weituotian closed 7 years ago

weituotian commented 7 years ago

like the project markdown-number-md-header

it is a important function optional to users!!!

naokazuterada commented 7 years ago

We have 'Ordered or unordered style for TOC elements' feature, but header number is not our defensive range. sorry.

weituotian commented 7 years ago

@naokazuterada maybe you can add the header number, and default false to users

naokazuterada commented 7 years ago

Hmmm sorry. 🦊 I think rewriting header is too much. This plugin supports just only insert TOC.

weituotian commented 7 years ago

@naokazuterada oh, is that hard to modify the headers with number? i am sorry about can not find a plugin to do that.

naokazuterada commented 7 years ago

Modifying the headers is possible technically, but it doesn't much plugin's ideal. I want this plugin to be simple and low dependency (portable) for users.

weituotian commented 7 years ago

@naokazuterada does sublime text3 provide the api to replace the headers?

naokazuterada commented 7 years ago

Yes!

weituotian commented 7 years ago

@naokazuterada i am confused about what does the folder bs4 do in the code

naokazuterada commented 7 years ago

Oh sorry... I'm not sure but maybe you can remove it. I think I added it for a new feature but it's not implemented yet... 🤕

weituotian commented 7 years ago

@naokazuterada may you write some code for me? i feel hard to modify the code, sadly.

naokazuterada commented 7 years ago

I think this method may help you. https://github.com/naokazuterada/MarkdownTOC/blob/master/MarkdownTOC.py#L219-L236

weituotian commented 7 years ago

finally i understand what link anchor means.

<a name="changelog"></a>
# Changelog
Lorem ipsum...

<a name="glossary"></a>
# Glossary
Lorem ipsum...

<a name="api-specification"></a>
# API Specification
Lorem ipsum...

@naokazuterada why there is a need to add an anchor ?

weituotian commented 7 years ago

@naokazuterada why you frequently use reversed, what does it want to do?

weituotian commented 7 years ago

@naokazuterada

you should add this repo in your readme.

this plugin fully compitiable with markdown toc.

it is a option to let people to choose what they want to do!

naokazuterada commented 7 years ago

@weituotian Sorry for late reply. I will take a look at your plugin and think about your suggestion. Anyway thank your for informing me!