Skip to content

Commit

Permalink
update package detail
Browse files Browse the repository at this point in the history
  • Loading branch information
amitguptagwl committed Apr 28, 2023
1 parent 6511e07 commit c7b3cea
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 16 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Note: If you find missing information about particular minor version, that version must have been changed without any functional change in this library.

**4.2.2 / 2023-04-18**
* fix #562: fix unpaired tag when it comes in last of a nested tag. Also throw error when unpaired tag is used as closing tag

**4.2.1 / 2023-04-18**
* fix: jpath after unpaired tags

Expand Down
2 changes: 1 addition & 1 deletion lib/fxp.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/fxp.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/fxparser.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/fxparser.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 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
@@ -1,6 +1,6 @@
{
"name": "fast-xml-parser",
"version": "4.2.1",
"version": "4.2.2",
"description": "Validate XML, Parse XML, Build XML without C/C++ based libraries",
"main": "./src/fxp.js",
"scripts": {
Expand Down
20 changes: 11 additions & 9 deletions spec/temp.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,23 @@
const {XMLParser, XMLBuilder} = require("../src/fxp");

describe("unpaired and empty tags", function() {
fit("bug test", function() {
it("bug test", function() {
const xmlData = `<root>
<a>1</a>
<a></a>
<a>2</a>
<a></a>
<a>3</a>
<a></a>
<a>
<unpaired>
</a>
<b>whatever</b>
</root>`;
const expected = {
"root": {
"a": [ 1,2,3]
"a": {
"u": "",
},
"b":"w"
}
};
const options = {
skipEmptyListItem: true
unpairedTags: ["unpaired"]
};
const parser = new XMLParser(options);
// const parser = new XMLParser({ updateTag});
Expand All @@ -28,5 +29,6 @@ describe("unpaired and empty tags", function() {
// expect(result).toEqual(expected);

});


});

0 comments on commit c7b3cea

Please sign in to comment.