@marko/translator-default 5.21.3 → 5.21.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,6 +16,15 @@ function buildIfStatement(path, args) {
16
16
 
17
17
  let nextPath = path.getNextSibling();
18
18
 
19
+ while (
20
+ nextPath.isMarkoComment() ||
21
+ nextPath.isMarkoText() && /^\s*$/.test(nextPath.node.value))
22
+ {
23
+ const ignorePath = nextPath;
24
+ nextPath = nextPath.getNextSibling();
25
+ ignorePath.remove();
26
+ }
27
+
19
28
  // Provide the if statement to the next part of the if chain.
20
29
  if (nextPath.isMarkoTag()) {
21
30
  const nextTagName = nextPath.get("name");
@@ -29,7 +29,6 @@ const mergeStaticCreateVisitor = {
29
29
 
30
30
  },
31
31
  MarkoTag(path, state) {
32
- if (path.node.attributes.find((a) => a.name === "key"))
33
32
  (0, _keyManager.getKeyManager)(path).resolveKey(path);
34
33
  const writeArgs = (0, _nativeTagVdom.tagArguments)(path, true);
35
34
  state.currentRoot = _compiler.types.callExpression(
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@marko/translator-default",
3
3
  "description": "Translates Marko templates to the default Marko runtime.",
4
- "version": "5.21.3",
4
+ "version": "5.21.6",
5
5
  "author": "Dylan Piercey <dpiercey@ebay.com>",
6
6
  "bugs": "https://github.com/marko-js/marko/issues/new?template=Bug_report.md",
7
7
  "dependencies": {
8
8
  "@babel/runtime": "^7.16.0",
9
- "@marko/babel-utils": "^5.21.1",
9
+ "@marko/babel-utils": "^5.21.3",
10
10
  "escape-string-regexp": "^4.0.0",
11
11
  "magic-string": "^0.25.7",
12
12
  "self-closing-tags": "^1.0.1"
13
13
  },
14
14
  "devDependencies": {
15
- "@marko/compiler": "^5.21.7",
16
- "marko": "^5.21.3"
15
+ "@marko/compiler": "^5.22.6",
16
+ "marko": "^5.21.9"
17
17
  },
18
18
  "files": [
19
19
  "dist"