wc-compiler 0.2.0 → 0.2.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/wcc.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wc-compiler",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Experimental native Web Components compiler.",
5
5
  "main": "src/wcc.js",
6
6
  "type": "module",
package/src/wcc.js CHANGED
@@ -10,7 +10,7 @@ import fs from 'node:fs/promises';
10
10
  let definitions;
11
11
 
12
12
  function getParse(html) {
13
- return html.indexOf('<html>') >= 0 || html.indexOf('<body>') || html.indexOf('<head>')
13
+ return html.indexOf('<html>') >= 0 || html.indexOf('<body>') >= 0 || html.indexOf('<head>') >= 0
14
14
  ? parse
15
15
  : parseFragment;
16
16
  }
@@ -131,7 +131,7 @@ async function renderToString(elementURL, options = {}) {
131
131
  const html = !lightMode && elementTagName ? `
132
132
  <${elementTagName}>
133
133
  ${serialize(finalTree)}
134
- </${elementTagName}
134
+ </${elementTagName}>
135
135
  `
136
136
  : serialize(finalTree);
137
137