Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore JS-style comments during parse #214

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

marvinhagemeister
Copy link
Collaborator

@marvinhagemeister marvinhagemeister commented Sep 1, 2021

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

@github-actions
Copy link

github-actions bot commented Sep 1, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Single line comments break props parsing
2 participants