Skip to content

Commit

Permalink
hcl4j update
Browse files Browse the repository at this point in the history
  • Loading branch information
davydotcom committed Jul 14, 2023
1 parent a85553c commit 070176e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ AssignmentExpression = [^]

<MULTILINESTRING> {
{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() );} }
}

<STRINGINTERPOLATED> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ escapedInterpolation = "$${var.firstName}"
variable {
description = <<EOL
This is a cool String
I love multiple lines
I love multiple lines
Don't you?
EOL
}
Expand All @@ -488,7 +488,7 @@ EOL
then:
results.containsKey('variable') == true
results.variable.description == '''This is a cool String
I love multiple lines
I love multiple lines
Don't you?
'''
}
Expand Down

0 comments on commit 070176e

Please sign in to comment.