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

Line breaks kill italics #48

Closed
ShawnTheBeachy opened this issue Jan 10, 2017 · 6 comments
Closed

Line breaks kill italics #48

ShawnTheBeachy opened this issue Jan 10, 2017 · 6 comments
Labels
bug Something isn't working request A request for a new feature or enhancement

Comments

@ShawnTheBeachy
Copy link

I have some HTML like this:

<i>Some text</br></i>

It's a strange way of doing it, but I have no control over the HTML. The problem is that this causes the converter to incorrectly render the markdown. It would be nice if elements in between the </i> didn't break it.

@baynezy
Copy link
Owner

baynezy commented Jan 10, 2017

@RareNCool that is not valid HTML
2017-01-10_0913

What would expect to happen?

@baynezy baynezy added the request A request for a new feature or enhancement label Jan 10, 2017
@ShawnTheBeachy
Copy link
Author

ShawnTheBeachy commented Jan 11, 2017

@baynezy Sorry, I was typing from memory.

Here's the exact HTML:
<br></div><div>Whispering, <i>I love you, before long I die, <br></i></div><div>I have travell’d a long way merely to look on you to touch you,

from which I get (with HTML2Markdown):

md

The desired behavior would be for it to know that </i> is closing italics and act accordingly, but I understand if that's too complicated to implement.

@baynezy
Copy link
Owner

baynezy commented Jan 11, 2017

@RareNCool - what is wrong with that? Or rather what would you expect it to do? For accuracy maybe create a Gist of what you expect and then link to that here.

@baynezy
Copy link
Owner

baynezy commented Apr 30, 2017

@TastesLikeTurkey - is this still a valid issue?

@ShawnTheBeachy
Copy link
Author

ShawnTheBeachy commented Apr 30, 2017

@baynezy Apologies, I forgot to ever respond. I think it still is, trying it at your demo page. For example, this:

<i>Hello there
I am Lord Foulspleen</i>

which is perfectly valid HTML, is converted to:

*Hello there
I am Lord Foulspleen*

which most Markdown renderers don't render correctly.

It would be nice if tags in the middle of other tags were handled correctly (adding a * at the end of the first line and the beginning of the second). But I don't know how feasible this is. If it's not something you want to bother with I can always try to come up with my own solution, too.

Hopefully this example is clear:

<i>Hello,<br />I am Lord Foulspleen</i>

would become:

*Hello,*\n*I am Lord Foulspleen*

@baynezy baynezy self-assigned this May 18, 2017
@baynezy baynezy added in progress bug Something isn't working labels May 18, 2017
@baynezy baynezy added ready and removed in progress labels Jun 11, 2017
@baynezy
Copy link
Owner

baynezy commented Sep 28, 2017

Blocked by #45

@baynezy baynezy removed their assignment Oct 5, 2017
@baynezy baynezy removed the ready label May 22, 2019
@ShawnTheBeachy ShawnTheBeachy closed this as not planned Won't fix, can't repro, duplicate, stale Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working request A request for a new feature or enhancement
Projects
Status: Done
Development

No branches or pull requests

2 participants