extwee 2.3.12 → 2.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/extwee.core.min.js +1 -1
- package/build/extwee.twine1html.min.js +1 -1
- package/build/extwee.twine2archive.min.js +1 -1
- package/build/extwee.tws.min.js +1 -1
- package/logs/arrays.html +79 -0
- package/logs/arrays.twee +64 -0
- package/logs/example.html +47 -0
- package/logs/fixing.js +23 -0
- package/logs/format-fixed.js +8 -0
- package/logs/format.js +8 -0
- package/logs/test-entities.cjs +40 -0
- package/package.json +15 -15
- package/src/Story.js +1 -1
- package/types/src/Story.d.ts +1 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const jsdom = require('jsdom');
|
|
2
|
+
const { JSDOM } = jsdom;
|
|
3
|
+
|
|
4
|
+
// Test in a DOM context
|
|
5
|
+
const dom = new JSDOM('<!DOCTYPE html><html><body></body></html>');
|
|
6
|
+
const doc = dom.window.document;
|
|
7
|
+
|
|
8
|
+
// Create elements with both encodings
|
|
9
|
+
const div1 = doc.createElement('div');
|
|
10
|
+
div1.setAttribute('data-test', 'test'value');
|
|
11
|
+
const div2 = doc.createElement('div');
|
|
12
|
+
div2.setAttribute('data-test', 'test'value');
|
|
13
|
+
|
|
14
|
+
console.log('div1 getAttribute:', div1.getAttribute('data-test'));
|
|
15
|
+
console.log('div2 getAttribute:', div2.getAttribute('data-test'));
|
|
16
|
+
console.log('Are they equal?', div1.getAttribute('data-test') === div2.getAttribute('data-test'));
|
|
17
|
+
|
|
18
|
+
// Test with innerHTML
|
|
19
|
+
div1.innerHTML = 'Text with 'quote'';
|
|
20
|
+
div2.innerHTML = 'Text with 'quote'';
|
|
21
|
+
console.log('div1 textContent:', div1.textContent);
|
|
22
|
+
console.log('div2 textContent:', div2.textContent);
|
|
23
|
+
console.log('Text content equal?', div1.textContent === div2.textContent);
|
|
24
|
+
|
|
25
|
+
// Test parsing HTML with both
|
|
26
|
+
const html1 = '<tw-passagedata name="Test" data-value="It's">Content</tw-passagedata>';
|
|
27
|
+
const html2 = '<tw-passagedata name="Test" data-value="It's">Content</tw-passagedata>';
|
|
28
|
+
|
|
29
|
+
const container1 = doc.createElement('div');
|
|
30
|
+
const container2 = doc.createElement('div');
|
|
31
|
+
container1.innerHTML = html1;
|
|
32
|
+
container2.innerHTML = html2;
|
|
33
|
+
|
|
34
|
+
const passage1 = container1.querySelector('tw-passagedata');
|
|
35
|
+
const passage2 = container2.querySelector('tw-passagedata');
|
|
36
|
+
|
|
37
|
+
console.log('\nParsing tw-passagedata:');
|
|
38
|
+
console.log('passage1 data-value:', passage1.getAttribute('data-value'));
|
|
39
|
+
console.log('passage2 data-value:', passage2.getAttribute('data-value'));
|
|
40
|
+
console.log('Attributes equal?', passage1.getAttribute('data-value') === passage2.getAttribute('data-value'));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "extwee",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.13",
|
|
4
4
|
"description": "A story compiler tool using Twine-compatible formats",
|
|
5
5
|
"author": "Dan Cox",
|
|
6
6
|
"main": "index.js",
|
|
@@ -36,33 +36,33 @@
|
|
|
36
36
|
"commander": "^14.0.2",
|
|
37
37
|
"graphemer": "^1.4.0",
|
|
38
38
|
"html-entities": "^2.6.0",
|
|
39
|
-
"node-html-parser": "^7.0.
|
|
39
|
+
"node-html-parser": "^7.0.2",
|
|
40
40
|
"pickleparser": "^0.2.1",
|
|
41
41
|
"semver": "^7.7.3",
|
|
42
42
|
"shelljs": "^0.10.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@babel/cli": "^7.28.
|
|
46
|
-
"@babel/core": "^7.28.
|
|
47
|
-
"@babel/preset-env": "^7.28.
|
|
48
|
-
"@eslint/js": "^9.39.
|
|
49
|
-
"@inquirer/prompts": "^8.0
|
|
50
|
-
"@types/node": "^
|
|
45
|
+
"@babel/cli": "^7.28.6",
|
|
46
|
+
"@babel/core": "^7.28.6",
|
|
47
|
+
"@babel/preset-env": "^7.28.6",
|
|
48
|
+
"@eslint/js": "^9.39.2",
|
|
49
|
+
"@inquirer/prompts": "^8.2.0",
|
|
50
|
+
"@types/node": "^25.0.9",
|
|
51
51
|
"@types/semver": "^7.7.1",
|
|
52
52
|
"babel-loader": "^10.0.0",
|
|
53
53
|
"clean-jsdoc-theme": "^4.3.0",
|
|
54
54
|
"core-js": "^3.47.0",
|
|
55
|
-
"eslint": "^9.39.
|
|
56
|
-
"eslint-plugin-jest": "^29.
|
|
57
|
-
"eslint-plugin-jsdoc": "^
|
|
58
|
-
"globals": "^
|
|
55
|
+
"eslint": "^9.39.2",
|
|
56
|
+
"eslint-plugin-jest": "^29.12.1",
|
|
57
|
+
"eslint-plugin-jsdoc": "^62.3.0",
|
|
58
|
+
"globals": "^17.0.0",
|
|
59
59
|
"jest": "^30.2.0",
|
|
60
60
|
"jest-environment-jsdom": "^30.2.0",
|
|
61
61
|
"regenerator-runtime": "^0.14.1",
|
|
62
62
|
"typescript": "^5.9.3",
|
|
63
|
-
"typescript-eslint": "^8.
|
|
64
|
-
"webpack": "^5.
|
|
65
|
-
"webpack-bundle-analyzer": "^5.
|
|
63
|
+
"typescript-eslint": "^8.53.1",
|
|
64
|
+
"webpack": "^5.104.1",
|
|
65
|
+
"webpack-bundle-analyzer": "^5.1.1",
|
|
66
66
|
"webpack-cli": "^6.0.1"
|
|
67
67
|
},
|
|
68
68
|
"repository": {
|
package/src/Story.js
CHANGED
package/types/src/Story.d.ts
CHANGED