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

fix: use html entity for consecutive newlines (fix #2394 #2586) #2912

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kshnurov
Copy link
Contributor

Please check if the PR fulfills these requirements

  • It's the right issue type on the title
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • It does not introduce a breaking change or has a description of the breaking change

Description

Consecutive newlines could be made by using html entities, e.g. space &#32;, which are completely compliant with the markdown spec. Current implementation with <br> breaks a lot of things.

This PR replaces <br> with a space HTML-entity &#32;, and also reverts #2598 for the following reasons:

  1. You instantly get an invalid markdown if you add an empty line to a list item
  2. Having 2 separate lists with only a newline between them is a rare and weird case, while having a newline in a list item is much more common.

I understand why you want markdown to reflect WYSIWYG as much as possible, but have you ever had a case when you needed 2 lists separated by an empty line? I can't imagine one, so let's consider it a feature - auto-merging of consecutive lists :)

@kshnurov
Copy link
Contributor Author

@jajugoguma @jwlee1108 what do you think about this one and a new version?

@stale
Copy link

stale bot commented May 21, 2023

This issue has been automatically marked as inactive because there hasn’t been much going on it lately. It is going to be closed after 7 days. Thanks!

@stale stale bot added the inactive label May 22, 2023
@kshnurov
Copy link
Contributor Author

@jajugoguma @jwlee1108

@stale stale bot removed the inactive label May 22, 2023
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 this pull request may close these issues.

None yet

1 participant