alanwalk / markdown-toc

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

Add check for Files>EOL ==="auto" and set it to "\n" #72

Open PHeonix25 opened 5 years ago

PHeonix25 commented 5 years ago

In the spirit of "be the change you want to see", I humbly propose this short solution that fixes issue #65.

FWIW - I haven't tested this conclusively, but it worked for me and saved me from having to change system-wide settings.

ctsstc commented 5 years ago

Using require('os').EOL should get you the current OS EOL.

PHeonix25 commented 5 years ago

@ctsstc - updated as requested. Sorry for the formatting fixes in package.json - it introduces some confusion as to what is an actual change, and what is a layout update. 😞

Also, I don't know the ramifications of changing the "module resolution" to "node", but I had to do that to get it to compile for me, so I've included it in the commit.

ctsstc commented 5 years ago

I too wasn't sure if we'd have the node namespace available for the extension, so I'm glad you dug into that, but I don't know much about it myself either.

surendra-y commented 5 years ago

Hey guys,

It would be great if we could have this merged and part of the latest release. I really like this extension.

Cheers!!

ratbeard commented 5 years ago

Please merge and deploy this!!!!!!!!!!!!!!!!!

ratbeard commented 5 years ago

Nevermind I just installed https://github.com/yzhang-gh/vscode-markdown instead!!!!!!

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