@e-mc/document 0.9.5 → 0.9.6

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/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  ## Interface
11
11
 
12
- * [View Source](https://www.unpkg.com/@e-mc/types@0.9.5/lib/index.d.ts)
12
+ * [View Source](https://www.unpkg.com/@e-mc/types@0.9.6/lib/index.d.ts)
13
13
 
14
14
  ```typescript
15
15
  import type { DataSource, ViewEngine } from "./squared";
@@ -183,14 +183,14 @@ NOTE: **@e-mc/document** is an abstract base class and cannot be instantiated. *
183
183
 
184
184
  ## References
185
185
 
186
- - https://www.unpkg.com/@e-mc/types@0.9.5/lib/squared.d.ts
187
- - https://www.unpkg.com/@e-mc/types@0.9.5/lib/asset.d.ts
188
- - https://www.unpkg.com/@e-mc/types@0.9.5/lib/core.d.ts
189
- - https://www.unpkg.com/@e-mc/types@0.9.5/lib/document.d.ts
190
- - https://www.unpkg.com/@e-mc/types@0.9.5/lib/filemanager.d.ts
191
- - https://www.unpkg.com/@e-mc/types@0.9.5/lib/logger.d.ts
192
- - https://www.unpkg.com/@e-mc/types@0.9.5/lib/settings.d.ts
193
- - https://www.unpkg.com/@e-mc/types@0.9.5/lib/watch.d.ts
186
+ - https://www.unpkg.com/@e-mc/types@0.9.6/lib/squared.d.ts
187
+ - https://www.unpkg.com/@e-mc/types@0.9.6/lib/asset.d.ts
188
+ - https://www.unpkg.com/@e-mc/types@0.9.6/lib/core.d.ts
189
+ - https://www.unpkg.com/@e-mc/types@0.9.6/lib/document.d.ts
190
+ - https://www.unpkg.com/@e-mc/types@0.9.6/lib/filemanager.d.ts
191
+ - https://www.unpkg.com/@e-mc/types@0.9.6/lib/logger.d.ts
192
+ - https://www.unpkg.com/@e-mc/types@0.9.6/lib/settings.d.ts
193
+ - https://www.unpkg.com/@e-mc/types@0.9.6/lib/watch.d.ts
194
194
 
195
195
  ## LICENSE
196
196
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/document",
3
- "version": "0.9.5",
3
+ "version": "0.9.6",
4
4
  "description": "Document constructor for E-mc.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -20,9 +20,9 @@
20
20
  "license": "BSD 3-Clause",
21
21
  "homepage": "https://github.com/anpham6/e-mc#readme",
22
22
  "dependencies": {
23
- "@e-mc/core": "0.9.5",
24
- "@e-mc/db": "0.9.5",
25
- "@e-mc/types": "0.9.5",
23
+ "@e-mc/core": "0.9.6",
24
+ "@e-mc/db": "0.9.6",
25
+ "@e-mc/types": "0.9.6",
26
26
  "chalk": "4.1.2",
27
27
  "htmlparser2": "^9.1.0",
28
28
  "js-yaml": "^4.1.0",
package/parse/index.js CHANGED
@@ -134,7 +134,7 @@ class XmlWriter {
134
134
  return leading + content + trailing;
135
135
  }
136
136
  static escapeXmlString(value, ampersand) {
137
- return value.replace(ampersand ? /[<>"'&]/g : /[<>"']|&([^#A-Za-z]|$)/g, capture => {
137
+ return value.replace(ampersand ? /[<>"'&]/g : /[<>"']|&(?![a-z][a-z\d]+|#(?:\d+|x[a-f\d]+))/g, capture => {
138
138
  switch (capture) {
139
139
  case '<':
140
140
  return '&lt;';
@@ -145,7 +145,7 @@ class XmlWriter {
145
145
  case "'":
146
146
  return '&apos;';
147
147
  default:
148
- return '&amp;' + (capture[1] || '');
148
+ return '&amp;';
149
149
  }
150
150
  });
151
151
  }