Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
uli-weltersbach opened this issue Nov 13, 2018 · 29 comments

Comments

@uli-weltersbach
Copy link

commented Nov 13, 2018

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

This comment has been minimized.

Copy link

commented Nov 13, 2018

Same here, on 1.29.0

@dansanduleac

This comment has been minimized.

Copy link

commented Nov 13, 2018

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

@widdowquinn

This comment has been minimized.

Copy link

commented Nov 13, 2018

Same here, occurred with the update to 1.29.0

@JasperCodes

This comment has been minimized.

Copy link

commented Nov 13, 2018

I have this issue as well since the update to 1.29.0

@pigreco

This comment has been minimized.

Copy link

commented Nov 13, 2018

me too, same problem 1.29.0

@gfx

This comment has been minimized.

Copy link

commented Nov 14, 2018

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

This comment has been minimized.

Copy link

commented Nov 14, 2018

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

image

@DaveMcBrave

This comment has been minimized.

Copy link

commented Nov 14, 2018

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

image

This works for me, thanks!

@imwyw

This comment has been minimized.

Copy link

commented Nov 15, 2018

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

image

it's work,thanks

@rajinder-yadav

This comment has been minimized.

Copy link

commented Nov 18, 2018

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

This comment has been minimized.

Copy link

commented Nov 18, 2018

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.

  • Press CTRL+P
  • Type "user setting"
  • Filter setting by typing 'eol'
  • Make appropriate changes.

eol-fix

terrillmoore added a commit to mcci-catena/arduino-lmic that referenced this issue Nov 20, 2018
Work around VS Code 1.29/Markdown TOC 1.5.6 bug
See AlanWalk/markdown-toc#65 for details on
this; for now, you must make sure you don't have auto-line-ending
enabled if you want to use the Markdown TOC featuer.
@DonkeyTable

This comment has been minimized.

Copy link

commented Nov 22, 2018

Well done lads /n works for me.

Donkey

@fedulovivan

This comment has been minimized.

Copy link

commented Dec 7, 2018

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

This comment has been minimized.

Copy link

commented Dec 20, 2018

Please update the plugin to handle the change. Thanks!

@col-panic

This comment has been minimized.

Copy link

commented Feb 1, 2019

Please provide update, this really s***

fzinfz added a commit to fzinfz/book that referenced this issue Feb 10, 2019
fix TOC
vscode: "user setting" - \n
AlanWalk/markdown-toc#65
mrakgr added a commit to mrakgr/The-Spiral-Language that referenced this issue Feb 26, 2019
"11:05am. AlanWalk/markdown-toc#65
It is this issue.

11:10am. Fixed this thing. Let me start work on the macro section."
@vestayin

This comment has been minimized.

Copy link

commented Apr 3, 2019

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

This comment has been minimized.

Copy link

commented Apr 3, 2019

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

This comment has been minimized.

Copy link

commented Apr 16, 2019

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

@huntertran

This comment has been minimized.

Copy link

commented May 7, 2019

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

@aydjay

This comment has been minimized.

Copy link

commented May 14, 2019

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

@jamezpolley

This comment has been minimized.

Copy link

commented May 15, 2019

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

@pauby

This comment has been minimized.

Copy link

commented May 15, 2019

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

This comment has been minimized.

Copy link

commented May 23, 2019

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

This comment has been minimized.

Copy link

commented May 31, 2019

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

This comment has been minimized.

Copy link

commented May 31, 2019

@kenorb

This comment has been minimized.

Copy link

commented Jul 3, 2019

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

This comment has been minimized.

Copy link

commented Jul 19, 2019

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

This comment has been minimized.

Copy link

commented Jul 19, 2019

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

@huntertran

This comment has been minimized.

Copy link

commented Jul 20, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.