Skip to content

How to ensure MarkdownRenderer uses the correct line separator? #442

Description

@peterdell

Hello,
thanks for this great library. It really does a great job. I am woking on Windows and observer that what the reader reads "CRLF" from the input, the MarkdownRenderer always uses "CR" (0xa) which result in unwanted whitespace diffs in my Github repo.

Is there a way to configure the instances, so they use the OS's line separator?

                printWriter = new PrintWriter(outputFile);
		var node = markupFile.getNode();
		var builder = MarkdownRenderer.builder();
		var markdownRenderer = builder.build();
		markdownRenderer.render(node, printWriter);

		printWriter.close();

I check the method defintion is saw is it used Appendable. And as there is "println" there, that may cause the problem, I think.

Thanks, Peter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions