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

Fix imutable pattern in EmitterSettings.SkipAnchorName #563

Merged
merged 2 commits into from Apr 1, 2021
Merged

Fix imutable pattern in EmitterSettings.SkipAnchorName #563

merged 2 commits into from Apr 1, 2021

Conversation

FSDKO
Copy link
Contributor

@FSDKO FSDKO commented Jan 15, 2021

In class EmitterSettings the imutable pattern is not implemented consistent. SkipAnchorName is not handled correct.

The following test fails (this ist not a big thing):

var settings1 = new EmitterSettings();
var settings2 = settings1.WithoutAnchorName();
Assert.IsFalse(settings1.SkipAnchorName);

Reason: The method WithoutAnchorName() does not create a new instance like all other Methods.

The following test also fails - and this is a trap:

var settings = new EmitterSettings().WithoutAnchorName().WithBestIndent();
Assert.IsTrue(settings.SkipAnchorName);

Reason: all other Method don't give SkipAnchorName into the ctor.

@aaubry aaubry force-pushed the master branch 2 times, most recently from cf25b75 to c1bab8d Compare January 15, 2021 15:17
@aaubry aaubry force-pushed the master branch 2 times, most recently from d4fd04a to cb0768c Compare March 30, 2021 12:15
@aaubry aaubry merged commit d8c5997 into aaubry:master Apr 1, 2021
@aaubry
Copy link
Owner

aaubry commented Apr 1, 2021

Thanks!

@github-actions
Copy link

github-actions bot commented Apr 1, 2021

This heature has been released in version 11.0.1.

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.

None yet

2 participants