Skip to content

Commit a6743f9

Browse files
committed
Cause scalar string with colon to be quoted #380
1 parent 3cdbb17 commit a6743f9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Microsoft.OpenApi/Writers/SpecialCharacterStringExtensions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ public static class SpecialCharacterStringExtensions
4242
// http://www.yaml.org/spec/1.2/spec.html#style/flow/plain
4343
private static readonly string[] _yamlPlainStringForbiddenCombinations =
4444
{
45-
": ",
45+
//": ",
46+
":", // Even though colons can be allowed, this change prevents unquoted trailing colon which causes a problem
4647
" #",
4748

4849
// These are technically forbidden only inside flow collections, but

0 commit comments

Comments
 (0)