htm icon indicating copy to clipboard operation
htm copied to clipboard

Ignore JS-style comments during parse

Open marvinhagemeister opened this issue 4 years ago â€ĸ 1 comments

This PR enhances htm's parser to detect and ignore JS-style comments, similar to JSX.

// Multi line
html`<div
	/* I'm ignored */
    id="foo" />`

// Single line
html`<div
  // I'm ignored
  id="foo" />`

Fixes #213

marvinhagemeister avatar Sep 01 '21 07:09 marvinhagemeister

Size Change: +248 B (+3%)

Total Size: 8.38 kB

Filename Size Change
./dist/htm.js 729 B +51 B (+8%) 🔍
./dist/htm.mjs 696 B +50 B (+8%) 🔍
./mini/index.js 577 B +49 B (+9%) 🔍
./mini/index.mjs 533 B +50 B (+10%) âš ī¸
./preact/standalone.mjs 5.35 kB +48 B (+1%)
â„šī¸ View Unchanged
Filename Size
./preact/index.js 145 B
./preact/index.mjs 117 B
./react/index.js 128 B
./react/index.mjs 99 B

compressed-size-action

github-actions[bot] avatar Sep 01 '21 16:09 github-actions[bot]