@e-mc/document 0.5.4 → 0.5.5
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/index.js +6 -3
- package/package.json +4 -4
package/LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright 2023
|
|
1
|
+
Copyright 2023 Anya Forger
|
|
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/index.js
CHANGED
|
@@ -235,7 +235,7 @@ class Document extends core_1.Client {
|
|
|
235
235
|
let match;
|
|
236
236
|
while (match = pattern.exec(source)) {
|
|
237
237
|
const preceding = source.substring(lastIndex, match.index);
|
|
238
|
-
let opening = 0, closing =
|
|
238
|
+
let opening = 0, closing = 0;
|
|
239
239
|
for (let j = 0, q = preceding.length; j < q; ++j) {
|
|
240
240
|
switch (preceding[j]) {
|
|
241
241
|
case '{':
|
|
@@ -246,8 +246,11 @@ class Document extends core_1.Client {
|
|
|
246
246
|
break;
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
-
if (opening === closing
|
|
250
|
-
|
|
249
|
+
if (opening === closing) {
|
|
250
|
+
if (!multiple || match[1] && sanitizeValue(match[1]) === sanitizeValue(local[3])) {
|
|
251
|
+
return upgrade ? parse_1.XmlWriter.replaceMatch(match, source, value, pattern) : source;
|
|
252
|
+
}
|
|
253
|
+
lastIndex = match.index + match[0].length;
|
|
251
254
|
}
|
|
252
255
|
}
|
|
253
256
|
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.5.
|
|
3
|
+
"version": "0.5.5",
|
|
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.5.
|
|
24
|
-
"@e-mc/db": "0.5.
|
|
25
|
-
"@e-mc/types": "0.5.
|
|
23
|
+
"@e-mc/core": "0.5.5",
|
|
24
|
+
"@e-mc/db": "0.5.5",
|
|
25
|
+
"@e-mc/types": "0.5.5",
|
|
26
26
|
"chalk": "4.1.2",
|
|
27
27
|
"htmlparser2": "^9.0.0",
|
|
28
28
|
"js-yaml": "^4.1.0",
|