alanwalk / markdown-toc

MarkdownTOC(Table Of Contents) Plugin for Visual Studio Code.
MIT License
141 stars 111 forks source link

Generate wrong TOC #89

Closed homezonebenny closed 4 years ago

homezonebenny commented 4 years ago

EDIT: You can fix it with just set it Eol to \n like descriped here:\ GitHub issue - Solution

The only not working thing is that those  s from the headline text goes into headline anchor link too! So basically you have to remove them from the Anchor link manually... This should be fixed and it's not a duplicate to the #65 issue post.

\ Alternatively use the plugin called:\ Markdown All in One

After you installed this plugin you press F1 or CTRL + P in your .md file and write:\ Create table of contents

This will create a TOC and everytime you save the document it will be updated automatically!

If you don't want a headline in your TOC navigation add:\ <!-- omit in toc --> directly above the headline.

For more informations read in the plugin description after the installation!

 


 

Using VSCode Plugin Markdown-Toc v1.5.6

Here's an image what it does: Screenshot on Imgur

Basically I have normal headlines like:

## &nbsp;First 1
## &nbsp;Second 1
# &nbsp;Main headline 2
## &nbsp;First 2
## &nbsp;Second 2

Now there are problems with it:

For example: # 2. &nbsp;Markdown Leadts to: auto- [2. &nbsp;Markdown](#2-nbspmarkdown) But should be: - [2. &nbsp;Markdown](#25-markdown)

This shows a correct navigation on top of the Markdown file and the target url works too.

revjtanton commented 4 years ago

I am also having this issue.

lougreenwood commented 4 years ago

+1

ZakeyDrower commented 4 years ago

+1 how to deal with it ?

wzur-r3 commented 4 years ago

This is a duplicate of #65 - see the answer there

hackjackyer commented 4 years ago

how to deal with it ?

save as \n

mircsicz commented 4 years ago

+1