markdown-toc icon indicating copy to clipboard operation
markdown-toc copied to clipboard

TOC eat digit

Open HUA-USA opened this issue 5 years ago • 4 comments

My Markdown title start with digit. The TOC eat those digit.

Plus, recently, I suddenly have a problem that, when I choose "Auto Markdown TOC: Insert/Update", it automatically insert section numbers to the TOC.

Before, I also have the problem that the leading digits are eaten. But after I save again, it was corrected. Now, the leading digit are just replaced by the section number.

HUA-USA avatar Nov 18 '19 16:11 HUA-USA

Can you share a simplified version of your document? In the meantime, please uncheck the setting Detect and Auto set section image

huntertran avatar Nov 18 '19 16:11 huntertran

Change the setting works. Thank you very much!

My document start with a date. For example:

2019-11-18 ...

After indexing, the first entry in TOC becomes:

-11-18 ...

If I save again, it was corrected as

2019-11-18

However, if the section number was added, it will always be:

  1. -11-18 ...

HUA-USA avatar Nov 18 '19 16:11 HUA-USA

I will turn off that setting by default in the next beta version. Thank you for using the extension 😄

huntertran avatar Nov 18 '19 16:11 huntertran

Hi, just to report that the problem still occurs to me even when the option is disabled, and even when updating the TOC after saving.

In my case I have a document where the second and third level of headers start with a date

Here is the result

# title

<!-- TOC -->

* [-02](#-02)
    * [-02-24](#-02-24)
    * [-02-25](#-02-25)
    * [-02-26](#-02-26)

<!-- /TOC -->

## 2020-02

### 2020-02-24

lorem ispum

### 2020-02-25

lorem ispum

### 2020-02-26

lorem ispum

zertrin avatar Feb 26 '20 07:02 zertrin