diff --git a/README.md b/README.md index 94666bb..655c6f3 100644 --- a/README.md +++ b/README.md @@ -16,12 +16,13 @@ Using gradle one can include the hcl4j dependency like so: ```groovy dependencies { - compile "com.bertramlabs.plugins:hcl4j:0.7.2" + compile "com.bertramlabs.plugins:hcl4j:0.7.3" } ``` ## What's New +* **0.7.3** Fixing Multiline Formatting Issue * **0.7.2** Handling nested Block types in a List as a non null value * **0.7.1** Adding some parser exception safety and added slf4j dependency for logging errors * **0.7.0** Adding some null safety on some of the base functions diff --git a/build.gradle b/build.gradle index 3d70994..9fc6224 100644 --- a/build.gradle +++ b/build.gradle @@ -30,7 +30,7 @@ ext { group = 'com.bertramlabs.plugins' -version = '0.7.2' +version = '0.7.3' ext.isReleaseVersion = !version.endsWith("SNAPSHOT") sourceCompatibility = "1.8" diff --git a/src/main/jflex/com/bertramlabs/plugins/hcl4j/HCLLexer.jflex b/src/main/jflex/com/bertramlabs/plugins/hcl4j/HCLLexer.jflex index 423a9d9..90b1ddd 100644 --- a/src/main/jflex/com/bertramlabs/plugins/hcl4j/HCLLexer.jflex +++ b/src/main/jflex/com/bertramlabs/plugins/hcl4j/HCLLexer.jflex @@ -463,7 +463,7 @@ AssignmentExpression = [^] { {LineTerminator} { if(isMultiLineFirstNewLine) {isMultiLineFirstNewLine = false; } else {string.append( yytext() );} } - [^\n\r]+ { if(yytext().trim().equals(endOfMultiLineSymbol)) { endOfMultiLineSymbol = null; if(blockNames != null) { blockNames.add(string.toString()); yybegin(HCLBLOCKATTRIBUTES); } else if(attribute != null) { attribute.appendChild(new HCLValue("string",string.toString(),yyline,yycolumn,yychar)) ; exitAttribute(); } else { throw new HCLParserException("String block found outside of block or attribute assignment."); }} else {string.append( isMultilineModified ? yytext().trim() : yytext() );} } + [^\n\r]+ { if(yytext().trim().equals(endOfMultiLineSymbol)) { endOfMultiLineSymbol = null; if(blockNames != null) { blockNames.add(string.toString()); yybegin(HCLBLOCKATTRIBUTES); } else if(attribute != null) { attribute.appendChild(new HCLValue("string",string.toString(),yyline,yycolumn,yychar)) ; exitAttribute(); } else { throw new HCLParserException("String block found outside of block or attribute assignment."); }} else {string.append( isMultilineModified ? yytext() : yytext() );} } } { diff --git a/src/test/groovy/com/bertramlabs/plugins/hcl4j/HCLParserSpec.groovy b/src/test/groovy/com/bertramlabs/plugins/hcl4j/HCLParserSpec.groovy index 69ca6d5..9efe081 100644 --- a/src/test/groovy/com/bertramlabs/plugins/hcl4j/HCLParserSpec.groovy +++ b/src/test/groovy/com/bertramlabs/plugins/hcl4j/HCLParserSpec.groovy @@ -475,7 +475,7 @@ escapedInterpolation = "$${var.firstName}" variable { description = <