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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Release notes

## Release 9.1.2
## Release 9.1.3

- Fix writePtr decrementation in InsertionQueue [#558]

This fixes another critical bug that was causing failures while parsing Yaml documents. If you are using release 9.1.1, please use this version instead.
- Fix an error when a stream returns less than the requested amount of bytes
Fixes #560


# Previous releases

- [9.1.2](releases/9.1.2.md)
- [9.1.1](releases/9.1.1.md)
- [9.1.0](releases/9.1.0.md)
- [8.1.2](releases/8.1.2.md)
Expand Down
21 changes: 15 additions & 6 deletions YamlDotNet/Core/EmitterSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ public EmitterSettings WithBestIndent(int bestIndent)
bestIndent,
BestWidth,
IsCanonical,
MaxSimpleKeyLength
MaxSimpleKeyLength,
SkipAnchorName
);
}

Expand All @@ -99,7 +100,8 @@ public EmitterSettings WithBestWidth(int bestWidth)
BestIndent,
bestWidth,
IsCanonical,
MaxSimpleKeyLength
MaxSimpleKeyLength,
SkipAnchorName
);
}

Expand All @@ -109,7 +111,8 @@ public EmitterSettings WithMaxSimpleKeyLength(int maxSimpleKeyLength)
BestIndent,
BestWidth,
IsCanonical,
maxSimpleKeyLength
maxSimpleKeyLength,
SkipAnchorName
);
}

Expand All @@ -119,14 +122,20 @@ public EmitterSettings Canonical()
BestIndent,
BestWidth,
true,
MaxSimpleKeyLength
MaxSimpleKeyLength,
SkipAnchorName
);
}

public EmitterSettings WithoutAnchorName()
{
SkipAnchorName = true;
return this;
return new EmitterSettings(
BestIndent,
BestWidth,
IsCanonical,
MaxSimpleKeyLength,
true
);
}
}
}