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

Svelte 5: Error with mjml #13537

Closed
lhoang opened this issue Oct 9, 2024 · 1 comment · Fixed by #13540
Closed

Svelte 5: Error with mjml #13537

lhoang opened this issue Oct 9, 2024 · 1 comment · Fixed by #13540
Assignees
Milestone

Comments

@lhoang
Copy link

lhoang commented Oct 9, 2024

Describe the bug

I'm using Svelte with MJML (the email HTML lib) to build the template of emails.

The compiler gives the following error :

CompileError: `<tbody>` is invalid inside `<mj-table>`

Same with <tr> if i remove <tbody>.
The official MJML documentation states it should be allowed :
https://documentation.mjml.io/#mj-table

Is there any way to bypass this error or to add custom rules to the HTML check ?

Reproduction

https://github.com/lhoang/bug-mjml-svelte5

Logs

No response

System Info

System:
    OS: macOS 14.7
    CPU: (10) arm64 Apple M1 Pro
    Memory: 72.63 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.1 - ~/.nvm/versions/node/v20.11.1/bin/node
    npm: 10.2.4 - ~/.nvm/versions/node/v20.11.1/bin/npm
    pnpm: 8.15.4 - ~/.nvm/versions/node/v20.11.1/bin/pnpm
  Browsers:
    Chrome: 129.0.6668.90
    Chrome Canary: 131.0.6764.0
  npmPackages:
    svelte: ^5.0.0-next.260 => 5.0.0-next.262

Severity

blocking an upgrade

@brunnerh
Copy link
Member

brunnerh commented Oct 9, 2024

I guess validation should be suspended for custom elements, same as for components.

<script>
	import Table from './Table.svelte';
</script>

<Table>
	<!-- No error -->
	<tbody></tbody>
</Table>

<div>
	<!-- Error -->
	<tbody></tbody>
</div>

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 a pull request may close this issue.

3 participants