Skip to content

Commit 805274e

Browse files
committed
Clear embedded module name from CopyOf value before recording. Fix AddLine special case.
1 parent 489f38a commit 805274e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/main.zig

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,6 +1465,7 @@ fn applyIniDeinliningRulesRecursivelyNode(allocator: Allocator, node: *Node, pro
14651465
if (copyOfNameOptional) |nameWithPossibleModulePrefix| {
14661466
if (indexOf(u8, nameWithPossibleModulePrefix, "/")) |modulePrefixEnd| {
14671467
moduleName = nameWithPossibleModulePrefix[0..modulePrefixEnd];
1468+
copyOfNameOptional = nameWithPossibleModulePrefix[modulePrefixEnd + 1 ..];
14681469
}
14691470
}
14701471

@@ -2472,15 +2473,15 @@ fn writeAstRecursively(node: *Node, buffered_writer: anytype, depth: usize) !voi
24722473
if (node.property) |property| {
24732474
try writeBuffered(buffered_writer, property);
24742475

2475-
// Named properties with values, and newline (for empty lines in multilinetext) require the equality symbol
2476-
if (node.value != null or strEql(property, "NewLine")) {
2476+
// Named properties with values, and AddLine (for empty lines in MultiLineText), require the equality symbol.
2477+
if (node.value != null or strEql(property, "AddLine")) {
24772478
try writeBuffered(buffered_writer, " = ");
24782479
}
24792480
}
24802481

24812482
if (node.value) |value| {
2482-
try writeBuffered(buffered_writer, value);
2483-
}
2483+
try writeBuffered(buffered_writer, value);
2484+
}
24842485

24852486
if (node.comments.items.len > 0) {
24862487
if (node.property != null) {

0 commit comments

Comments
 (0)