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

Trailing spaces causes initial characters to be swallowed #27

Closed
delucis opened this issue Mar 16, 2024 · 1 comment · Fixed by #28
Closed

Trailing spaces causes initial characters to be swallowed #27

delucis opened this issue Mar 16, 2024 · 1 comment · Fixed by #28
Labels
bug Something isn't working

Comments

@delucis
Copy link

delucis commented Mar 16, 2024

If the content string passed to <Markdown> ends in one or more spaces, the equivalent number of characters are removed from the start of the content.

Some examples:

Input Output
<mark>Highlighted word</mark> with no trailing space <mark>Highlighted word</mark> with no trailing space
<mark>Highlighted word</mark> with trailing space mark>Highlighted word</mark> with trailing space
Non-initial <mark>Highlighted word</mark> with trailing spaces -initial <mark>Highlighted word</mark> with trailing spaces

Minimal reproduction: https://stackblitz.com/edit/github-futqf6?file=src%2Fpages%2Findex.astro

I wasn’t able to reproduce this in the marked playground, so I’m guessing it’s something specific happening here or perhaps in the plugins astro-remote uses?

@Adammatthiesen
Copy link
Collaborator

Adammatthiesen commented Mar 16, 2024

Darn... I thought we had this issue fixed... its something with the dedent function that seems to be causing it... I guess we only partially fixed it in #23 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants