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

Wrong interpretations of empty lines in converting MD #1

Open
the-man-with-a-golden-mind opened this issue Dec 22, 2023 · 3 comments
Open

Comments

@the-man-with-a-golden-mind
Copy link

the-man-with-a-golden-mind commented Dec 22, 2023

Hello,
I have and example:

## First

1. 13123
2. qwd

## Second 

as my MD

I am getting:
h2( "First", ), ol( li( "13123", ), li( "qwd", ), ), h2( "Second", ),

I am expecting to see breaking line between "h2" elements and the list. MD converter is ignoring empty lines.

@the-man-with-a-golden-mind
Copy link
Author

Maybe param from "marked" which is keeping the "breakes" could solve it? Or give the possibility to pass the arguments to marked.

@Tao-VanJS
Copy link
Member

I don't think line breaks are necessary in this case as <h2>, <ol> and <li> are displayed as block elements: https://developer.mozilla.org/en-US/docs/Web/CSS/display.

@the-man-with-a-golden-mind
Copy link
Author

Hmm right. But by md docs "two empty lines are working as a
html element". Isn't it?

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

2 participants