alanwalk / markdown-toc

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

"auto" inserted instead of line breaks in TOC #65

Open uli-weltersbach opened 5 years ago

uli-weltersbach commented 5 years ago

I'm having an issue where each line in the TOC is prefixed with the text "auto". It seems like the text "auto" is inserted instead of linebreaks.

Sample output:

<!-- TOC -->autoauto- [1. Terminology](#1-terminology)auto- [2. VCS preparation](#2-vcs-preparation)auto- [3. File preparation](#3-file-preparation)auto    - [3.1. Full & partial package](#31-full--partial-package)auto    - [3.2. Partial package only](#32-partial-package-only)auto    - [3.3. Full & partial package (continued)](#33-full--partial-package-continued)auto- [4. VCS finalization](#4-vcs-finalization)autoauto<!-- /TOC -->

I haven't experienced the issue prior to updating VS Code, so it might be related to changes in the latest version.

My VS Code version:

Version: 1.29.0 (user setup)
Commit: 5f24c93878bd4bc645a4a17c620e2487b11005f9
Date: 2018-11-12T07:47:15.448Z
Electron: 2.0.12
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64
Gliptal commented 5 years ago

Same here, on 1.29.0

dansanduleac commented 5 years ago

This was working on 1.28.x, I encountered this as soon as VsCode updated to 1.29.0.

widdowquinn commented 5 years ago

Same here, occurred with the update to 1.29.0

JasperCodes commented 5 years ago

I have this issue as well since the update to 1.29.0

pigreco commented 5 years ago

me too, same problem 1.29.0

gfx commented 5 years ago

I guess this is a new breaking feature of 1.29.0:

https://code.visualstudio.com/updates/v1_29#_new-default-for-fileseol-auto

New default for files.eol: auto

The files.eol end of line setting now has a new default value auto. When set to auto, the end of line character for new files is specific to the operating system. It is \r\n on Windows and \n on macOS and Linux. You can also still explicitly set file.eol to \n or \r\n.

neerolyte commented 5 years ago

Setting eol back to \n is an adequate work around for me:

image

DaveMcBrave commented 5 years ago

Setting eol back to \n is an adequate work around for me:

image

This works for me, thanks!

imwyw commented 5 years ago

Setting eol back to \n is an adequate work around for me:

image

it's work,thanks

rajinder-yadav commented 5 years ago

v1.5.6 I have been seeing this issue for a long while now, TOC is not getting generated correctly.

screenshot_20181118_184656

rajinder-yadav commented 5 years ago

I do have a workaround just need to use global search-replace like this.

Make sure to select the ".*"

snr

Or for something less annoying than this, using @gfx suggestion above just change it in user settings like this.

eol-fix

DonkeyTable commented 5 years ago

Well done lads /n works for me.

Donkey

fedulovivan commented 5 years ago

Well, root cause of this issue is now clear, but switching from auto to \n in global settings is workaround only. Global editor option "auto" should be handled by this plugin.

xploreraj commented 5 years ago

Please update the plugin to handle the change. Thanks!

col-panic commented 5 years ago

Please provide update, this really s***

vestayin commented 5 years ago

I experienced the same issue that string "auto" was used as line breaking char. After change settings of files.eof from "auto" (OS native line breaking) to "\n", the problem was resolved. Added comment here because this bug should be fixed soon since this plugin is suggested by VSCode on official site and TOC key feature didn't work at the first time. Not all user understand how to walk around it.

realmariano commented 5 years ago

I understand the workaround, my question being, if I change the global setting, will I break something else, eg. will my python programs work properly when importing data for example? There´s no way to set this property only to .md extension?

pauby commented 5 years ago

Any traction on getting this fixed or on #72 getting merged?

huntertran commented 5 years ago

Is there any update on this bug or the project is abandoned?

aydjay commented 5 years ago

STill having this issue using VSCode 1.33.1 and Markdown TOC V1.5.6

jamezpolley commented 5 years ago

"Latest commit 1fc815e on Apr 9, 2018" - I think its safe to regard this as abandoned.

pauby commented 5 years ago

I would either contact the owner and take this over or fork it, move the PR's over and work on it but I have no knowledge of how VSCode Extensions work and no time to learn at the moment. BUT if anybody has the knowledge and energy I would gladly help where needed.

martijnvanschie commented 5 years ago

Shame this is not being updated. Work around might work but i'm not sure about the impact on other features. Also microsoft still promotes this extension on their markdown page. Markdown and Visual Studio Code

p-kaczynski commented 5 years ago

This is a very useful extension, but obviously seems abandoned.

I feel what we should avoid is getting numerous forks with numerous VS Marketplace submissions.

How about forking to a dedicated "GitHub Team for Open Source" organisation and repo, and just keeping a number of maintainers (so that the scenario of the sole maintainer falling off the face of the Earth does not repeat in the future)?

aydjay commented 5 years ago

That sound like an ideal solution

On Fri, 31 May 2019, 16:17 p-kaczynski, notifications@github.com wrote:

This is a very useful extension, but obviously seems abandoned.

I feel what we should avoid is getting numerous forks with numerous VS Marketplace submissions.

How about forking to a dedicated "GitHub Team for Open Source" organisation and repo, and just keeping a number of maintainers (so that the scenario of the sole maintainer falling off the face of the Earth does not repeat in the future)?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AlanWalk/markdown-toc/issues/65?email_source=notifications&email_token=ACIFYZXDXP36Q3IPJSHLTW3PYE6RXA5CNFSM4GDMJIVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWVQLQY#issuecomment-497747395, or mute the thread https://github.com/notifications/unsubscribe-auth/ACIFYZVHACNMNZ643ZEPRRLPYE6RXANCNFSM4GDMJIVA .

kenorb commented 5 years ago

Auto setting didn't work on macOS, it generated a mess with auto everywhere, not toc. I'm using 1.5.6. Changing to \n in the user settings worked.

dialex commented 5 years ago

I feel what we should avoid is getting numerous forks with numerous VS Marketplace submissions.

100% agreed

How about forking to a dedicated "GitHub Team for Open Source" organisation and repo (...)

I'm curious @p-kaczynski , does such an org already exist?

Wouldn't the same thing happen, like a group of 10 devs but only 1 knows how to maintain extension X? Such org might have to blindly trust the PRs being submitted.

dialex commented 5 years ago

Found it! There's an org for it https://github.com/rejuvenate/rejuvenate Who will ask them to fork this repo?

huntertran commented 5 years ago

I managed to fix all the tslints (which is required to build new version) and merge the pull request. The new version of this extension can be found at this marketplace link Source code

If you found any issue related to code refactoring, please create new issue (and pull request if you can fix it). Many thanks

hackjackyer commented 4 years ago

Setting eol back to \n is an adequate work around for me:

image

its really highly help for me

martijnvanschie commented 4 years ago

Thanks for taking the time to fix this. It works again. Also with Eol: Default.

kghose commented 3 years ago

I guess this hasn't been fixed in the release on VS Code marketplace? I got this issue in a fresh install.