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 preserve newlines in Markdown text parsed by MDsveX? #700

Open
d-adamkiewicz opened this issue Mar 25, 2025 · 3 comments
Open

How to preserve newlines in Markdown text parsed by MDsveX? #700

d-adamkiewicz opened this issue Mar 25, 2025 · 3 comments

Comments

@d-adamkiewicz
Copy link

How to preserve newlines in Markdown text parsed by MDsveX? By default many of newlines are reduced to the one.

@github-project-automation github-project-automation bot moved this to Triage + Refine in mdsvex Mar 25, 2025
@pngwn
Copy link
Owner

pngwn commented Mar 25, 2025

What is the use case here? Why is it important to preserve new lines?

@d-adamkiewicz
Copy link
Author

For testing purposes. It's not big deal so if no config option to do this please ignore this post.

@PeppeL-G
Copy link

Don't know if this will help you, but Markdown in MDsveX is based on CommonMark. You can read in their specification about the behavior of hard line breaks and soft line breaks. For example, a line ending with \ will be interpreted as a hard line break.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Triage + Refine
Development

No branches or pull requests

3 participants