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

Improved ATX headings #74

Closed in4lio closed 8 years ago

in4lio commented 8 years ago

Extra spaces processing in headings, according this document

#        Heading 0

before this patch:

-       Heading 0

after:

- Heading 0

At least one space is required between the # characters and the heading’s contents, but many implementations, github for example, currently do not require the space.

#Heading 1

before:

-eading 1

after:

- Heading 1

Removing of closing sequence of # characters

#### Heading 2 ####

before:

- Heading 2  ####

after:

- Heading 2

This change is Reviewable

naokazuterada commented 8 years ago

Hello @in4lio, thank you for your PR !

This modification also solves issue #49.

in4lio commented 8 years ago

Not at all) Thank you for useful plugin!