@@ -76,13 +76,13 @@ private ConfigNode parseNode(@NotNull String line, final @NotNull BufferedReader
7676 final String value = line .substring (colonIndex + 1 ).trim ();
7777
7878 if (value .isEmpty () || line .trim ().endsWith (":" )) {
79- final String justRead = reader .readLine (). trim () ;
79+ final String justRead = reader .readLine ();
8080
81- if (justRead .startsWith ("-" )) {
81+ if (justRead .trim (). startsWith ("-" )) {
8282 final List <Object > list = new ArrayList <>();
8383
84- if (!justRead .startsWith ("-" )) throw new InscriptException ();
85- final String justReadItemValue = justRead .substring (1 ).trim ();
84+ if (!justRead .trim (). startsWith ("-" )) throw new InscriptException ();
85+ final String justReadItemValue = justRead .trim (). substring (1 ).trim ();
8686
8787 if (!justReadItemValue .trim ().isEmpty ()) {
8888 InlineValue <?> inlineMatched = new StringValue ();
@@ -167,14 +167,14 @@ public String getKey() {
167167 section .getComments ().addAll (tempComments );
168168 tempComments .clear ();
169169
170- String childLine = justRead ;
171-
172170 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 );
171+ if (justRead .startsWith (justReadExpectedChildIndent ) && !justRead .trim ().startsWith ("-" )) {
172+ final ConfigNode childNode = parseNode (justRead , reader , depth + 1 , tempComments );
175173 if (childNode != null ) section .getChildren ().add (childNode );
176174 }
177175
176+ String childLine ;
177+
178178 while ((childLine = reader .readLine ()) != null ) {
179179 final String expectedChildIndent = InscriptConstants .INDENT .get ().apply (depth + 1 );
180180 if (!childLine .startsWith (expectedChildIndent ) && !childLine .trim ().startsWith ("-" )) break ;
0 commit comments