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

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

Open
uli-weltersbach opened this issue Nov 13, 2018 · 32 comments · May be fixed by #92
Open

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

uli-weltersbach opened this issue Nov 13, 2018 · 32 comments · May be fixed by #92

Comments

@uli-weltersbach
Copy link

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

Gliptal commented Nov 13, 2018

Same here, on 1.29.0

@dansanduleac
Copy link

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

@widdowquinn
Copy link

Same here, occurred with the update to 1.29.0

@JasperCodes
Copy link

I have this issue as well since the update to 1.29.0

@pigreco
Copy link

pigreco commented Nov 13, 2018

me too, same problem 1.29.0

@gfx
Copy link

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

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

image

@DaveMcBrave
Copy link

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

image

This works for me, thanks!

@imwyw
Copy link

imwyw commented Nov 15, 2018

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

image

it's work,thanks

@rajinder-yadav
Copy link

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

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

Well done lads /n works for me.

Donkey

@fedulovivan
Copy link

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

Please update the plugin to handle the change. Thanks!

@col-panic
Copy link

Please provide update, this really s***

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

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

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

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

pauby commented Apr 16, 2019

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

@huntertran
Copy link

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

@aydjay
Copy link

aydjay commented May 14, 2019

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

@jamezpolley
Copy link

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

@pauby
Copy link

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

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

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

aydjay commented May 31, 2019 via email

@kenorb
Copy link

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

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

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

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

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

image

its really highly help for me

@martijnvanschie
Copy link

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

@kghose
Copy link

kghose commented Dec 2, 2020

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

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