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

How to use at @ character? #87

Open
hugotox opened this issue Jan 14, 2024 · 6 comments
Open

How to use at @ character? #87

hugotox opened this issue Jan 14, 2024 · 6 comments

Comments

@hugotox
Copy link

hugotox commented Jan 14, 2024

If I try to use the at character, it renders a big string of bad characters. Any idea how to escape it?

e.g.

<SvelteMarkdown source="[email protected]" />

Renders:

[&#x68;&#101;&#108;&#x6c;&#x6f;&#64;&#x6d;&#97;&#105;&#x6c;&#x2e;&#x63;&#111;&#109;](mailto:&#x68;&#101;&#108;&#x6c;&#x6f;&#64;&#x6d;&#97;&#105;&#x6c;&#x2e;&#x63;&#111;&#109;)
@domhel
Copy link

domhel commented Jan 22, 2024

According to
this https://www.markdownguide.org/basic-syntax/#urls-and-email-addresses
and this markedjs/marked#2397
it should only be a link when wrapped with <...> but it just doesn't work.
I now use backticks so it's treated as code but I'm not happy

@hugotox
Copy link
Author

hugotox commented Jan 22, 2024

Links work, just the @ character alone fails. See my example here https://stackblitz.com/edit/sveltejs-kit-template-default-burzvt?file=src%2Froutes%2F%2Bpage.svelte

@williamoverton
Copy link

@hugotox did you manage to get around this?

@hugotox
Copy link
Author

hugotox commented May 8, 2024

@hugotox did you manage to get around this?

Yes, kindof. The character @ as it is doesn't work, but you can use the html entity &#64;. Also if rendering an email address then it works fine, e.g. [[email protected]](mailto:[email protected])

@OrkhanAlikhanov
Copy link

Ran into the same issue. Solution is mentioned here: #50

@dreamscached
Copy link

mangle: false doesn't work for me, how does anyone manage to unescape HTML entities?

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

5 participants