Skip to content

Commit

Permalink
Merge pull request #1997 from MeilCli/update/action
Browse files Browse the repository at this point in the history
update actions
  • Loading branch information
MeilCli authored Jul 29, 2024
2 parents ec9af30 + 8ad0287 commit 1a9e377
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions dist/vendor.js
Original file line number Diff line number Diff line change
Expand Up @@ -8197,6 +8197,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 @@ -8206,17 +8207,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

0 comments on commit 1a9e377

Please sign in to comment.