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

Add ConfigureNewLineExtension markdown extension #214

Merged

Conversation

augustoproiete
Copy link
Contributor

@augustoproiete augustoproiete commented Feb 21, 2018

This PR adds an extension which allows devs to define what string to use for line-endings when writing.

As per my comment in #211, Markdig always uses \n for line-breaks. This extension exposes an easy way to override the default behavior when defining the pipeline.

Below is an example on how to define that line-endings should use Environment.NewLine:

var pipeline = new MarkdownPipelineBuilder()
	.ConfigureNewLine(Environment.NewLine)
	.UseAdvancedExtensions()
	.Build();

ps: This PR builds on #213, which should be merged first.

@xoofx
Copy link
Owner

xoofx commented Mar 23, 2018

Thanks! Could you add a few tests?

@augustoproiete augustoproiete force-pushed the add-configure-new-line-extension branch from 6c6a819 to c68a488 Compare March 23, 2018 15:26
@xoofx xoofx merged commit 7620b2b into xoofx:master Apr 4, 2018
@augustoproiete augustoproiete deleted the add-configure-new-line-extension branch April 12, 2018 23:32
@augustoproiete
Copy link
Contributor Author

Thanks! Could you add a few tests?

Tests added via #222

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

Successfully merging this pull request may close these issues.

2 participants