@zubra/runtime 5.1.2 → 5.3.0
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/dist/production/remark.js +6 -1
- package/package.json +1 -1
- package/src/remark.js +6 -1
|
@@ -56,7 +56,12 @@ export function remark(root, template, parts, { blueprint, isOpen, isClose, read
|
|
|
56
56
|
let index = 0;
|
|
57
57
|
for (; t; t = t.nextSibling) {
|
|
58
58
|
if (t.nodeType === TEXT) {
|
|
59
|
-
|
|
59
|
+
// Static text (if kept): the same words as the template's. Text that isn't (a page's own
|
|
60
|
+
// `<x-a>Save</x-a>` where the template has only whitespace) isn't server markup.
|
|
61
|
+
if (cursor?.nodeType === TEXT) {
|
|
62
|
+
if (cursor.data.trim() !== t.data.trim()) throw fail;
|
|
63
|
+
cursor = cursor.nextSibling;
|
|
64
|
+
}
|
|
60
65
|
continue;
|
|
61
66
|
}
|
|
62
67
|
const path = [...prefix, index];
|
package/package.json
CHANGED
package/src/remark.js
CHANGED
|
@@ -55,7 +55,12 @@ export function remark(root, template, parts, { blueprint, isOpen, isClose, read
|
|
|
55
55
|
let index = 0;
|
|
56
56
|
for (; t; t = t.nextSibling) {
|
|
57
57
|
if (t.nodeType === TEXT) {
|
|
58
|
-
|
|
58
|
+
// Static text (if kept): the same words as the template's. Text that isn't (a page's own
|
|
59
|
+
// `<x-a>Save</x-a>` where the template has only whitespace) isn't server markup.
|
|
60
|
+
if (cursor?.nodeType === TEXT) {
|
|
61
|
+
if (cursor.data.trim() !== t.data.trim()) throw fail;
|
|
62
|
+
cursor = cursor.nextSibling;
|
|
63
|
+
}
|
|
59
64
|
continue;
|
|
60
65
|
}
|
|
61
66
|
const path = [...prefix, index];
|