Skip to content
This repository has been archived by the owner on Jun 15, 2019. It is now read-only.

Fix headers and lists #6

Merged
merged 2 commits into from
Oct 15, 2018
Merged

Fix headers and lists #6

merged 2 commits into from
Oct 15, 2018

Conversation

t9t
Copy link
Contributor

@t9t t9t commented Mar 16, 2018

I noticed two issues in html2md:

  • When a header (eg. <h3>) contains any new lines in its body, it will split the header contents over multiple lines, breaking the header in Markdown (because in Markdown, a header just starts with #'s and anything on the next line is not part of the header). Since in HTML and Markdown all white space is treated the same, I chose to replace line endings with spaces
  • When a list item (eg. <li>) ends with a white space (eg. tab or space), the newline at the end will be removed from the output, causing the next list item or next element to appear on the same line.

@patcon
Copy link
Contributor

patcon commented Oct 14, 2018

Hi! Mind if I ask what the status on this is, @lunny?

Do you need someone else to do code review? Or is there something that was preventing it from being merged? Happy to help if I can!

@lunny
Copy link
Owner

lunny commented Oct 15, 2018

@patcon sorry to forget this PR.

@lunny lunny merged commit f5699d9 into lunny:master Oct 15, 2018
@patcon
Copy link
Contributor

patcon commented Oct 15, 2018

No worries! Thanks a billion for everything. That library is rad

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants