Skip to content

Commit 9e679d4

Browse files
committed
v1.1.1
Important YAML Bug Fix
1 parent a2df648 commit 9e679d4

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins {
33
}
44

55
group = 'dev.manere.inscript'
6-
version = '1.1.0'
6+
version = '1.1.1'
77

88
repositories {
99
mavenCentral()

src/main/java/dev/manere/inscript/format/YAMLFormat.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,14 @@ public String getKey() {
167167
section.getComments().addAll(tempComments);
168168
tempComments.clear();
169169

170-
String childLine;
170+
String childLine = justRead;
171+
172+
final String justReadExpectedChildIndent = InscriptConstants.INDENT.get().apply(depth + 1);
173+
if (childLine.startsWith(justReadExpectedChildIndent) && !childLine.trim().startsWith("-")) {
174+
final ConfigNode childNode = parseNode(childLine, reader, depth + 1, tempComments);
175+
if (childNode != null) section.getChildren().add(childNode);
176+
}
177+
171178
while ((childLine = reader.readLine()) != null) {
172179
final String expectedChildIndent = InscriptConstants.INDENT.get().apply(depth + 1);
173180
if (!childLine.startsWith(expectedChildIndent) && !childLine.trim().startsWith("-")) break;

0 commit comments

Comments
 (0)