Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Generate wrong TOC #89

Closed
homezonebenny opened this issue Mar 16, 2020 · 6 comments
Closed

Generate wrong TOC #89

homezonebenny opened this issue Mar 16, 2020 · 6 comments

Comments

@homezonebenny
Copy link

homezonebenny commented Mar 16, 2020

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:

  • It generates a wrong TOC section. Even when I use normal headlines so your plugin is not working in basics
  • If you use   in your headline it use this the target url too and this makes a problem

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
Copy link

I am also having this issue.

@lougreenwood
Copy link

+1

@ZakeyDrower
Copy link

+1
how to deal with it ?

@wzur-r3
Copy link

wzur-r3 commented Apr 10, 2020

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

@hackjackyer
Copy link

how to deal with it ?

save as \n

@mircsicz
Copy link

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants