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

Code Spans with ` are incorrectly trimmed #149

Closed
Jolanrensen opened this issue Feb 29, 2024 · 2 comments · Fixed by #150
Closed

Code Spans with ` are incorrectly trimmed #149

Jolanrensen opened this issue Feb 29, 2024 · 2 comments · Fixed by #150

Comments

@Jolanrensen
Copy link
Contributor

Jolanrensen commented Feb 29, 2024

Thanks to this line

val output = nodes.joinToString(separator = "") { HtmlGenerator.leafText(text, it, false) }.trim()

Code spans like code span are trimmed when being rendered:
image

I believe this is incorrect and code spans should retain all their content. This is also how Github renders their Gfm.

@Jolanrensen
Copy link
Contributor Author

Looks like the tests that caught these were turned off by @ajalt in 49d1849d

@Jolanrensen
Copy link
Contributor Author

Jolanrensen commented Feb 29, 2024

Diving deeper, I think the issue was caused by b44cfd1 in #108 by @FirstTimeInForever.

I believe the TableAwareCodeSpanGeneratingProvider is used any time code spans are detected instead of just in tables.

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.

1 participant