@e-mc/document 0.8.6 → 0.8.7

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.
Files changed (3) hide show
  1. package/README.md +9 -9
  2. package/index.js +6 -3
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  ## Interface
11
11
 
12
- - https://www.unpkg.com/@e-mc/types@0.8.6/lib/index.d.ts
12
+ - https://www.unpkg.com/@e-mc/types@0.8.7/lib/index.d.ts
13
13
 
14
14
  ```typescript
15
15
  import type { DataSource, ViewEngine } from "./squared";
@@ -85,14 +85,14 @@ interface DocumentConstructor extends ModuleConstructor {
85
85
 
86
86
  ## References
87
87
 
88
- - https://www.unpkg.com/@e-mc/types@0.8.6/lib/squared.d.ts
89
- - https://www.unpkg.com/@e-mc/types@0.8.6/lib/asset.d.ts
90
- - https://www.unpkg.com/@e-mc/types@0.8.6/lib/core.d.ts
91
- - https://www.unpkg.com/@e-mc/types@0.8.6/lib/document.d.ts
92
- - https://www.unpkg.com/@e-mc/types@0.8.6/lib/filemanager.d.ts
93
- - https://www.unpkg.com/@e-mc/types@0.8.6/lib/logger.d.ts
94
- - https://www.unpkg.com/@e-mc/types@0.8.6/lib/settings.d.ts
95
- - https://www.unpkg.com/@e-mc/types@0.8.6/lib/watch.d.ts
88
+ - https://www.unpkg.com/@e-mc/types@0.8.7/lib/squared.d.ts
89
+ - https://www.unpkg.com/@e-mc/types@0.8.7/lib/asset.d.ts
90
+ - https://www.unpkg.com/@e-mc/types@0.8.7/lib/core.d.ts
91
+ - https://www.unpkg.com/@e-mc/types@0.8.7/lib/document.d.ts
92
+ - https://www.unpkg.com/@e-mc/types@0.8.7/lib/filemanager.d.ts
93
+ - https://www.unpkg.com/@e-mc/types@0.8.7/lib/logger.d.ts
94
+ - https://www.unpkg.com/@e-mc/types@0.8.7/lib/settings.d.ts
95
+ - https://www.unpkg.com/@e-mc/types@0.8.7/lib/watch.d.ts
96
96
 
97
97
  ## LICENSE
98
98
 
package/index.js CHANGED
@@ -218,7 +218,7 @@ class Document extends core_1.Client {
218
218
  let match;
219
219
  while (match = pattern.exec(source)) {
220
220
  const preceding = source.substring(lastIndex, match.index);
221
- let opening = 0, closing = namespaces.length - 1;
221
+ let opening = 0, closing = 0;
222
222
  for (let j = 0, q = preceding.length; j < q; ++j) {
223
223
  switch (preceding[j]) {
224
224
  case '{':
@@ -229,8 +229,11 @@ class Document extends core_1.Client {
229
229
  break;
230
230
  }
231
231
  }
232
- if (opening === closing && (!multiple || match[1] && sanitizeValue(match[1]) === sanitizeValue(local[3]))) {
233
- return upgrade ? parse_1.XmlWriter.replaceMatch(match, source, value, pattern) : source;
232
+ if (opening === closing) {
233
+ if (!multiple || match[1] && sanitizeValue(match[1]) === sanitizeValue(local[3])) {
234
+ return upgrade ? parse_1.XmlWriter.replaceMatch(match, source, value, pattern) : source;
235
+ }
236
+ lastIndex = match.index + match[0].length;
234
237
  }
235
238
  }
236
239
  return spliceSource(source, lastIndex, lastIndex, ident.repeat(length) + value + newline);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/document",
3
- "version": "0.8.6",
3
+ "version": "0.8.7",
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.8.6",
24
- "@e-mc/db": "0.8.6",
25
- "@e-mc/types": "0.8.6",
23
+ "@e-mc/core": "0.8.7",
24
+ "@e-mc/db": "0.8.7",
25
+ "@e-mc/types": "0.8.7",
26
26
  "chalk": "4.1.2",
27
27
  "htmlparser2": "^9.1.0",
28
28
  "js-yaml": "^4.1.0",