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

mdsnippets adds a newline to the end of every file #431

Closed
drewburlingame opened this issue Nov 19, 2021 · 4 comments
Closed

mdsnippets adds a newline to the end of every file #431

drewburlingame opened this issue Nov 19, 2021 · 4 comments
Labels
Milestone

Comments

@drewburlingame
Copy link
Contributor

drewburlingame commented Nov 19, 2021

Describe the bug

using

  • mdsnippets 24.2.0+49a8b7f7e522f8c32d351d97663e97e12722b82c
  • Windows10
  • git bash

The command used

mdsnippets -c InPlaceOverwrite --url-prefix "https://github.com/bilal-fazlani/commanddotnet/blob/master"

Most of my md files do not have end with a newline. eg.

image

But after running mdsnippets, newline is added to the end of every file

image

It does not add newline to files that already end with newline

It does add newline to every file, not just the files that will have snippets injected

Minimal Repro

Run mdsnippets with md files that do not end with newline

Submit a PR that fixes the bug

I haven't investigated where the fix should be yet. Do you have a sense of where I should look?

@SimonCropp SimonCropp added this to the 24.2.1 milestone Nov 19, 2021
@SimonCropp SimonCropp added the Bug label Nov 19, 2021
@SimonCropp
Copy link
Owner

can u try 24.2.1

@drewburlingame
Copy link
Contributor Author

updated and it still adds the new line.

image

@SimonCropp
Copy link
Owner

can you have a go at submitting a PR with a test that replicated this

@drewburlingame
Copy link
Contributor Author

If I get time, I'll look into it. I'll probably prioritize looking into the indent feature as I've already accepted the extra line in all the docs in CommandDotNet.

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

No branches or pull requests

2 participants