-
Notifications
You must be signed in to change notification settings - Fork 96
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
</p> attempted to close an element that was not open #505
Comments
As soon as I made the issue, I understood what was going on, the Giscus component looks like this, <script>
import { onMount } from 'svelte';
export let id = undefined;
export let host = 'https://giscus.app';
export let repo;
export let repoId;
export let category = undefined;
export let categoryId = undefined;
export let mapping = 'pathname';
export let term = undefined;
export let strict = '0';
export let reactionsEnabled = '1';
export let emitMetadata = '0';
export let inputPosition = 'bottom';
export let theme = 'light';
export let lang = 'en';
export let loading = 'eager';
let mounted = false;
onMount(() => {
mounted = true;
import('giscus');
});
</script>
{#if mounted}
<giscus-widget
{id}
{host}
{repo}
repoid={repoId}
{category}
categoryid={categoryId}
{mapping}
{term}
{strict}
reactionsenabled={reactionsEnabled}
emitmetadata={emitMetadata}
inputposition={inputPosition}
{theme}
{lang}
{loading}
/>
{/if} instead of the That fix works for me locally but when I deploy my project to Vercel or when someone else clones the repo and installs the packages, that error will occur again. I am no longer sure if this problem is an issue with mdsvex or giscus component, please let me know if I should post this issue in their repository, thank you in advance. |
That 'shorthand' isn't valid HTML really. Mdsvex is a little stricter about which self closing tags are allowed which could be causing the issue. Custom elements should have an explicit closing tag. |
I didn't know that custom elements should have an explicit closing tag. I've opened an issue in the Giscus repository; giscus/giscus-component#1371 Thanks for the help! |
Hey everyone, my
mdsvex.config.mjs
looks like thisI am working on a SvelteKit project and I am using the Giscus component: https://github.com/giscus/giscus-component. I've noticed that if I include
'.svelte'
in theextensions
array inmdsvex.config.mjs
, I get the following errorIf I remove
'.svelte'
from theextensions
array, and it only contains `'.md', the error goes away.I've made sure that the Giscus component code does not contain any
</p>
or any other element.Here is my project where the error occurs; https://github.com/NazCodeland/NazCodeland-V2.git, if you go into the
mdsvex.config.mjs
and add'.svelte'
in theextensions
array, the error will occur.The text was updated successfully, but these errors were encountered: