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

Don't fail when HTML tags are implied #6752

Merged
merged 7 commits into from
Sep 18, 2021

Conversation

thewilkybarkid
Copy link
Contributor

@thewilkybarkid thewilkybarkid commented Aug 23, 2021

↪️ Pull Request

Fixes #6672.

Currently just failing test cases, as it's dependent on posthtml/posthtml-parser#80.

💻 Examples

See #6672.

🚨 Test instructions

Test cases included.

✔️ PR Todo

  • Added/updated unit tests for this change
  • Filled out test instructions (In case there aren't any unit tests)
  • Included links to related issues/PRs

@height
Copy link

height bot commented Aug 23, 2021

Link Height tasks by mentioning a task ID in the pull request title or description, commit messages, or comments.

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@thewilkybarkid
Copy link
Contributor Author

posthtml-parser has a new release; I've just tried an upgrade locally but unfortunately still hit a 'Source indices must be monotonic' message in 'should support meta tags'. I'm away for the week now so won't be able to take a look until next weekend; but I'm keen for this to be fixed so if anyone could take a look and solve it that'd be great.

@thewilkybarkid
Copy link
Contributor Author

Managed to take a look, and it's the SVG in the test rather than the HTML, which is curious.

@thewilkybarkid
Copy link
Contributor Author

thewilkybarkid commented Sep 4, 2021

Seems to be something to do with self-closing tags and a lack of whitespace. Can get around this for now by disabling sourceLocations in the SVGTransformer since it's not needed, but there will need to be a bugfix upstream.

Edit: Opened fb55/htmlparser2#941.

@thewilkybarkid
Copy link
Contributor Author

Opened fb55/htmlparser2#941 for the posthtml-parser error message.

@devongovett devongovett merged commit b6faa0c into parcel-bundler:v2 Sep 18, 2021
@thewilkybarkid thewilkybarkid deleted the html-implied-tags branch September 19, 2021 06:38
lettertwo added a commit that referenced this pull request Sep 22, 2021
* v2:
  Upgrade Flow to 0.160.1 (#6964)
  Only use error overlay if there's a document (#6960)
  Don't fail when HTML tags are implied (#6752)
  Reorder resolveOptions() env priority (#6904)
  Change edge types to numbers (#6126)
  Bump swc (#6848)
  Print diagnostics for scope hoisting bailouts at verbose log level (#6918)
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.

Parcel 2: @parcel/transformer-html: Source indices must be monotonic
2 participants