Skip to content

Re-instate preserving of line endings #524

@claremacrae

Description

@claremacrae

Preamble

Hi Simon, it looks to me like #22 might have got un-fixed at some time.

Here's what's happening...

Describe the bug

A clear and concise description of what the bug is. Include any relevant version information.

On macOS, running:

mdsnippets --version
mdsnippets 24.2.2+78ae4cdf92e0c9f14cb7b822c6464773569e6b56

with this configuration:

{
  "$schema": "https://raw.githubusercontent.com/SimonCropp/MarkdownSnippets/master/schema.json",
  "ExcludeDirectories": [ "node_modules" ],
  "Convention": "InPlaceOverwrite",
  "TocLevel": 5
}

... I find that all my .md files are converted from LF end-of-lines to CRLF

image

I actually don't yet have any snippets or toc lines. I just wanted to make sure that I could run the tool, having not used it for a while.

A clear and concise description of what you expected to happen.

Add any other context about the problem here.

I would like mdsnippets to preserve the line-endings of the input file. It used to do th

Minimal Repro

Ensure you have replicated the bug in a minimal solution with the fewest moving parts. Often this will help point to the true cause of the problem. Upload this repro as part of the issue, preferably a public GitHub repository or a downloadable zip. The repro will allow the maintainers of this project to smoke test the any fix.

Please let me know if you need that.

Submit a PR that fixes the bug

Submit a Pull Request (PR) that fixes the bug. Include in this PR a test that verifies the fix. If you were not able to fix the bug, a PR that illustrates your partial progress will suffice.

Sorry, unable to do that with my current skills.

I looked at the issue #22 to see if it linked to a specific commit, in which case I would have looked through the repo at the history of the relevant lines...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions