-
Notifications
You must be signed in to change notification settings - Fork 128
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
Links in my mardown-file are not hidden, because of "redundant spaces" #344
Comments
Thanks for the feedback :) I can reproduce this problem. It's because Turndown (a js library that MaoXian used to convert HTML to Markdown) converts block elements into <a href="https://example.org/index">
<div class="a-image-wrapper">
<img src="a-image.png">
<div>
</a> So it'll be converted to markdown like this: [
![](a-image.png)
](https://example.org/index)
Yes, It should delete these spaces. Maybe we can unwrap the image link, and put the link below the image. like the belowing markdown, what do you think? ![](i-am-a-image.png)
[image link](https://example.org/index) |
Not sure, if I understand 100% correctly. Do you mean this:
or this:
|
But maybe this is an issue, that better should be solved by the turndown-developper then. |
Sorry for the delay reply. I was trying to fix it (remove these unneed spaces), and I can't stop thinking of other cases that a link
I search Turndown's issues. there did has an issue about this, see: The author of turndown said this:
Because this issue is opened at 2020-06-14. I don't see turndown will fix it in the near future. But this problem needs to be solved, even we can't come out a very good solution that can handle all block element inside anchor element cases. And we will consider that unwrap solution in the future. |
Thank you for taking care of the problem. I do not know something about markdown and HTML tags. But it is important, that making a fix does not create new conversion problems that did not exist before. So, I think it is important to delete the spaces only in a specific context. |
I agree with you. We can handle these common cases first. I've fix this specific case on the new version and I've published it. Please update and send feedbacks if the problem is still exist? |
Thanks for the feedback. This new case is not easy to solve. The problem is there's not corresponding format in markdown about block links (in this case: multiple lines of text). So how do we convert these block links to markdown? As this issue is for the image links specifically, I've created a new issue for the discussion about general block links. |
It looks like my "markdown-file" created with "maoxian-web-clipper" has too much spaces after "[" and before "]" in links.
I have clipped this page:
Source: https://www.ebay.de/sch/i.html?_nkw=dummies+statistik&_sacat=0&_sop=15
This gave me the following file:
2023-08-07 22-09-15.zip
It looks like this in reading view:
Only after deleting spaces after "[" and before "]" in the links, I get a better design:
Question:
Shouldn't the maoxian-web-clipper delete this spaces automatically?
Can I do anything?
Would appreciate some answer. Thank you.
The text was updated successfully, but these errors were encountered: