Skip to content

Commit 9f7f5ef

Browse files
committed
feat(core registry): Move clone-code Pattern to the beginning.
We want clone-code to clone the markup before any other patterns are modifying it.
1 parent 76a83c5 commit 9f7f5ef

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/core/registry.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,13 @@ const registry = {
140140
patterns.splice(patterns.indexOf("validation"), 1);
141141
patterns.unshift("validation");
142142
}
143+
// Add clone-code to the very beginning - we want to copy the markup
144+
// before any other patterns changed the markup.
145+
if (patterns.includes("clone-code")) {
146+
patterns.splice(patterns.indexOf("clone-code"), 1);
147+
patterns.unshift("clone-code");
148+
}
149+
143150
return patterns;
144151
},
145152

0 commit comments

Comments
 (0)