Skip to content

Commit c7b3cea

Browse files
committedApr 28, 2023
update package detail
1 parent 6511e07 commit c7b3cea

8 files changed

+21
-16
lines changed
 

‎CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Note: If you find missing information about particular minor version, that version must have been changed without any functional change in this library.
22

3+
**4.2.2 / 2023-04-18**
4+
* 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
5+
36
**4.2.1 / 2023-04-18**
47
* fix: jpath after unpaired tags
58

‎lib/fxp.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/fxp.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/fxparser.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/fxparser.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fast-xml-parser",
3-
"version": "4.2.1",
3+
"version": "4.2.2",
44
"description": "Validate XML, Parse XML, Build XML without C/C++ based libraries",
55
"main": "./src/fxp.js",
66
"scripts": {

‎spec/temp.js

+11-9
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,23 @@
33
const {XMLParser, XMLBuilder} = require("../src/fxp");
44

55
describe("unpaired and empty tags", function() {
6-
fit("bug test", function() {
6+
it("bug test", function() {
77
const xmlData = `<root>
8-
<a>1</a>
9-
<a></a>
10-
<a>2</a>
11-
<a></a>
12-
<a>3</a>
13-
<a></a>
8+
<a>
9+
<unpaired>
10+
</a>
11+
<b>whatever</b>
1412
</root>`;
1513
const expected = {
1614
"root": {
17-
"a": [ 1,2,3]
15+
"a": {
16+
"u": "",
17+
},
18+
"b":"w"
1819
}
1920
};
2021
const options = {
21-
skipEmptyListItem: true
22+
unpairedTags: ["unpaired"]
2223
};
2324
const parser = new XMLParser(options);
2425
// const parser = new XMLParser({ updateTag});
@@ -28,5 +29,6 @@ describe("unpaired and empty tags", function() {
2829
// expect(result).toEqual(expected);
2930

3031
});
32+
3133

3234
});

0 commit comments

Comments
 (0)
Please sign in to comment.