-
Notifications
You must be signed in to change notification settings - Fork 52
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
github publish: some markup conversion failures #850
Comments
hey, thanks for the report! yeah, converting HTML to markdown will often be imperfect, and mostly at the mercy of html2text, but i can take a look! |
Just tested: lxml and mf2py handle the <----------- correctly (and escape the < in the html output of the e-content), which makes it surprising it doesn't make it through. |
fixed the |
the nested lists and space before italicized not are afaict bugs in html2text. i may narrow them down and file issues; we'll see. |
It seems the nested list is something where the original markdown implementation and those based on it accept html2text's output (the markdown documentation doesn't appear to describe nested lists at all), but CommonMark, on which GitHub's markdown support is based, specified it explicitly in a way that requires a deeper indentation. Its specification has a section on this history: https://spec.commonmark.org/0.28/#motivation |
Looks like the space before |
...and the two spaces indent for lists is hard coded here: https://github.com/Alir3z4/html2text/blob/296e6f24d16a36bf88b8042d56ebd69ec37aef9c/html2text/__init__.py#L602 |
I've filed Alir3z4/html2text#344 for the list bug, and a PR that fixes it in Alir3z4/html2text#345. |
fixed! the first three at least, if not the |
I just used a fairly complex GH issue (that I had written on GH) to test POSSE-ing to a test repo:
https://www.svenknebel.de/posts/2018/11/8/ to sknebel/random-test-repo#1
The HTML in my post is a cleaned up version of Githubs HTML (with mentions of users and other issues removed to cut down the noise)
The following things in the created issue were unexpected:
<
>
were added around bare links<
- the browser still displayed the code following, probably because<------
clearly wasn't valid HTML tag, but it is understandable bridgy (or maybe even mf2py?) failed there (I have since edited the post to use a<
)EDIT: feel free to move this issue to granary or ask me to split it up or ... - happy to help you as much as I can.
The text was updated successfully, but these errors were encountered: