@e-mc/document 0.6.1 → 0.6.2
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/LICENSE +1 -1
- package/README.md +1 -1
- package/index.js +6 -3
- package/package.json +4 -4
package/LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright 2023
|
|
1
|
+
Copyright 2023 Ninja Scroll
|
|
2
2
|
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
4
|
|
package/README.md
CHANGED
package/index.js
CHANGED
|
@@ -217,7 +217,7 @@ class Document extends core_1.Client {
|
|
|
217
217
|
let match;
|
|
218
218
|
while (match = pattern.exec(source)) {
|
|
219
219
|
const preceding = source.substring(lastIndex, match.index);
|
|
220
|
-
let opening = 0, closing =
|
|
220
|
+
let opening = 0, closing = 0;
|
|
221
221
|
for (let j = 0, q = preceding.length; j < q; ++j) {
|
|
222
222
|
switch (preceding[j]) {
|
|
223
223
|
case '{':
|
|
@@ -228,8 +228,11 @@ class Document extends core_1.Client {
|
|
|
228
228
|
break;
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
|
-
if (opening === closing
|
|
232
|
-
|
|
231
|
+
if (opening === closing) {
|
|
232
|
+
if (!multiple || match[1] && sanitizeValue(match[1]) === sanitizeValue(local[3])) {
|
|
233
|
+
return upgrade ? parse_1.XmlWriter.replaceMatch(match, source, value, pattern) : source;
|
|
234
|
+
}
|
|
235
|
+
lastIndex = match.index + match[0].length;
|
|
233
236
|
}
|
|
234
237
|
}
|
|
235
238
|
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.6.
|
|
3
|
+
"version": "0.6.2",
|
|
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": "MIT",
|
|
21
21
|
"homepage": "https://github.com/anpham6/e-mc#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@e-mc/core": "0.6.
|
|
24
|
-
"@e-mc/db": "0.6.
|
|
25
|
-
"@e-mc/types": "0.6.
|
|
23
|
+
"@e-mc/core": "0.6.2",
|
|
24
|
+
"@e-mc/db": "0.6.2",
|
|
25
|
+
"@e-mc/types": "0.6.2",
|
|
26
26
|
"chalk": "4.1.2",
|
|
27
27
|
"htmlparser2": "^9.0.0",
|
|
28
28
|
"js-yaml": "^4.1.0",
|