Skip to content

Commit

Permalink
Merge pull request #44 from hashicorp-forge/dependabot/npm_and_yarn/f…
Browse files Browse the repository at this point in the history
…ast-xml-parser-4.4.1

Bump fast-xml-parser from 4.4.0 to 4.4.1
  • Loading branch information
brandonc committed Aug 26, 2024
2 parents 98f96d9 + 5e80900 commit b052d7d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
19 changes: 15 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2946,6 +2946,7 @@ Builder.prototype.j2x = function(jObj, level) {
//repeated nodes
const arrLen = jObj[key].length;
let listTagVal = "";
let listTagAttr = "";
for (let j = 0; j < arrLen; j++) {
const item = jObj[key][j];
if (typeof item === 'undefined') {
Expand All @@ -2955,17 +2956,27 @@ Builder.prototype.j2x = function(jObj, level) {
else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;
// val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;
} else if (typeof item === 'object') {
if(this.options.oneListGroup ){
listTagVal += this.j2x(item, level + 1).val;
if(this.options.oneListGroup){
const result = this.j2x(item, level + 1);
listTagVal += result.val;
if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) {
listTagAttr += result.attrStr
}
}else{
listTagVal += this.processTextOrObjNode(item, key, level)
}
} else {
listTagVal += this.buildTextValNode(item, key, '', level);
if (this.options.oneListGroup) {
let textValue = this.options.tagValueProcessor(key, item);
textValue = this.replaceEntitiesValue(textValue);
listTagVal += textValue;
} else {
listTagVal += this.buildTextValNode(item, key, '', level);
}
}
}
if(this.options.oneListGroup){
listTagVal = this.buildObjectNode(listTagVal, key, '', level);
listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level);
}
val += listTagVal;
} else {
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/exec": "^1.1.1",
"fast-xml-parser": "^4.4.0"
"fast-xml-parser": "^4.4.1"
},
"devDependencies": {
"@types/jest": "^29.5.12",
Expand Down

0 comments on commit b052d7d

Please sign in to comment.