Skip to content

Commit 1646225

Browse files
committed
Add NoInline DisplayKind
1 parent b2377a1 commit 1646225

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/Tomlyn/Model/ModelToTomlTransform.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,9 @@ private bool VisitObject(ObjectDynamicAccessor accessor, object currentObject, b
255255
}
256256

257257
bool isLastValue = lastValue is not null && ReferenceEquals(lastValue, prop.Value);
258-
var propToInline = (!isLastValue || lastInline) && propInline;
258+
259+
var displayKind = GetDisplayKind(prop.Key);
260+
var propToInline = (!isLastValue || lastInline) && propInline && (displayKind != TomlPropertyDisplayKind.NoInline);
259261

260262
// If we switch from non inline to inline, ensure that the scope is here
261263
if (!inline && propToInline)

src/Tomlyn/Model/TomlPropertiesMetadata.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,5 @@ public enum TomlPropertyDisplayKind
9191
StringLiteralMulti,
9292

9393
InlineTable,
94+
NoInline
9495
}

0 commit comments

Comments
 (0)