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

isInline option causes issues when parsing HTML #96

Open
brunobely opened this issue Aug 21, 2024 · 0 comments
Open

isInline option causes issues when parsing HTML #96

brunobely opened this issue Aug 21, 2024 · 0 comments

Comments

@brunobely
Copy link

brunobely commented Aug 21, 2024

Having the isInline option in this case seems to duplicate the HTML tags. When I pass it the following as source:

<p>Enter your details below to get your <span class="text-primary">personalized</span> challenge!</p>

I get the following HTML out:

<p>
  <!-- HTML_TAG_END -->
  Enter your details below to get your
  <!-- HTML_TAG_START -->
  <span class="text-primary">
    <!-- HTML_TAG_END -->
    personalized
    <!-- HTML_TAG_START -->
  </span>
  <!-- HTML_TAG_END -->
  challenge!
  <!-- HTML_TAG_START -->
</p>
<p>
  Enter your details below to get your <span class="text-primary"></span>personalized challenge!<p>
</p>

If I omit the outerp, input (for this test case, the output is incorrect even with isInline={false}--it outputs the contents of the span twice, once in the span tag and once outside, see below):

Enter your details below to get your <span class="text-primary">personalized</span> challenge!

I get:

isInline={true}:

Enter your details below to get your <span class="text-primary"></span>personalized challenge!

isInline={false}:

Enter your details below to get your
<span class="text-primary">
  <!-- HTML_TAG_END -->
  personalized
  <!-- HTML_TAG_START -->
</span>personalized challenge!</h2>

Can't create a Svelte REPL to reproduce because of the following issue when trying to import svelte-markdown:

"Slugger" is not exported by "https://unpkg.com/[email protected]/lib/marked.esm.js", imported by "https://unpkg.com/[email protected]/src/markdown-parser.js".
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

No branches or pull requests

1 participant