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.
@@ -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&apos;value');
11
+ const div2 = doc.createElement('div');
12
+ div2.setAttribute('data-test', 'test&#39;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 &apos;quote&apos;';
20
+ div2.innerHTML = 'Text with &#39;quote&#39;';
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&apos;s">Content</tw-passagedata>';
27
+ const html2 = '<tw-passagedata name="Test" data-value="It&#39;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.12",
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.1",
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.3",
46
- "@babel/core": "^7.28.5",
47
- "@babel/preset-env": "^7.28.5",
48
- "@eslint/js": "^9.39.1",
49
- "@inquirer/prompts": "^8.0.1",
50
- "@types/node": "^24.10.1",
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.1",
56
- "eslint-plugin-jest": "^29.2.1",
57
- "eslint-plugin-jsdoc": "^61.4.1",
58
- "globals": "^16.5.0",
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.48.0",
64
- "webpack": "^5.103.0",
65
- "webpack-bundle-analyzer": "^5.0.1",
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
@@ -7,7 +7,7 @@ import { encode } from 'html-entities';
7
7
  const creatorName = 'extwee';
8
8
 
9
9
  // Set the creator version.
10
- const creatorVersion = '2.3.12';
10
+ const creatorVersion = '2.3.13';
11
11
 
12
12
  /**
13
13
  * Story class.
@@ -251,5 +251,5 @@ export class Story {
251
251
  #private;
252
252
  }
253
253
  export const creatorName: "extwee";
254
- export const creatorVersion: "2.3.12";
254
+ export const creatorVersion: "2.3.13";
255
255
  import Passage from './Passage.js';