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

MarkdownTOC not generating links in TOC #124

Closed sammcj closed 6 years ago

sammcj commented 6 years ago

Howdy, Since the update over the weekend, MarkdownTOC generates the TOC without any hyperlinks.

For example adding a TOC to the following generates:

<!-- MarkdownTOC -->

- Big heading
  - less big heading
- Another big heading
  - another less big heading
    - even smaller heading

<!-- /MarkdownTOC -->

# Big heading
## less big heading
# Another big heading
## another less big heading
### even smaller heading

so...

<!-- MarkdownTOC -->

- Big heading                      <- Not a link
  - less big heading               <- Not a link
- Another big heading              <- Not a link
  - another less big heading       <- Not a link
    - even smaller heading         <- Not a link

<!-- /MarkdownTOC -->

screen shot 2018-03-26 at 2 40 54 pm

sammcj commented 6 years ago

My colleague noticed that the settings format has changed and your user setters weren't migrated (so still a bug IMO).

Before:

{
  "default_autoanchor": true,
  "default_autolink": true,
  "default_bracket": "round",
  "default_depth": 5
}

After:

{
  "defaults": {
    "autoanchor": true,
    "autolink": true,
    "bracket": "round",
    "levels": [1,2,3,4,5,6],
    "indent": "\t",
    "remove_image": true,
    "link_prefix": "",
    "bullets": ["-","*"],
    "lowercase": "only_ascii",
    "style": "unordered",
    "uri_encoding": true,
    "markdown_preview": ""
  },
  "id_replacements": [
    {
      "pattern": "[_*]{2}([^\\s])[_*]{2}",
      "replacement": "\\1"
    },
    {
      "pattern": "[_*]([^\\s])[_*]",
      "replacement": "\\1"
    },
    {
      "pattern": "\\s+",
      "replacement": "-"
    },
    {
      "pattern": "&lt;|&gt;|&amp;|&apos;|&quot;|&#60;|&#62;|&#38;|&#39;|&#34;|!|#|$|&|'|\\(|\\)|\\*|\\+|,|/|:|;|=|\\?|@|\\[|\\]|`|\"|\\.|\\\\|<|>|{|}|™|®|©",
      "replacement": ""
    }
  ],
  "logging": false
}
naokazuterada commented 6 years ago

Yes, 3.x has breaking changes. See Upgrade Guide for detail.

There are not 'Auto migration' feature. I'm on a way of fixing the versioning on PackageControl( #123 ). So after it's fixed, user could notice the upgrade information. Please wait.