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

Yarle adds triple brackets for many links? #550

Closed
sbsamarski opened this issue Dec 28, 2023 · 2 comments
Closed

Yarle adds triple brackets for many links? #550

sbsamarski opened this issue Dec 28, 2023 · 2 comments

Comments

@sbsamarski
Copy link

sbsamarski commented Dec 28, 2023

I just imported a few thousand of my Evernote notes. I can see that almost in all of them, Yarle imported many website photos with triple square brackets around the resource image file, and added a link enclosed in parenthesis.
I tried changing Yarle settings, but there are no settings to change this behaviour. The setting to convert web clips is set to yes.

For example, a small photo with attached link gets imported as:

[![[./_resources/Note_name/photo.jpg|80x80]]](https://website.com/example_address/)

Obsidian renders this like:

[PHOTO](https://website.com/example_address/)

Or in words: one open bracket, a photo, one closed bracket, the entire link enclosed in parenthesis.

This is even more pronounced with larger headings because many headings have a tiny photo with a link in front of them.

If I manually remove the first and last brackets there is just a photo displayed, followed with the entire link enclosed in parenthesis.
I get the accurate render by removing the link with parenthesis completely.

From what I see, Yarle is not able to correctly import a photo that has a link attached to it.
If it is not possible in markdown to assign a link to an imported/locally stored photo/resource then rather discard that link? A photo is anyway imported.
Or offer this choice as an option in import settings?

EDIT:
Technically, a photo with a link attached should be imported in this format:

[![](./_resources/Note_name/photo.jpg|80x80)](https://website.com/example_address/)

Link formatted in this way displays correctly.
Basically, it looks like there is a bug where Yarle wrongly formats images with links.


Another inconsistency is that some imported photos display with a wrong aspect ratio.
For example, if a photo that has this md is displayed with a wrong aspect ratio:

![[./_resources/Note_name/photo2.jpg|1600x900]]

If I remove the Y size, the photo is displayed with correct proportions.

![[./_resources/Note_name/photo2.jpg|1600]]

I suppose some photos get imported with wrong dimensions, not sure if it's a bug or something else. It would be ideal if photos get imported with correct aspect ratio, but if that is not possible then would it be better if photos get imported only with an X size? Like in the above example, simply to omit the Y size?
Or at least offer that as an option in import settings?

Here is an example web page where both above examples can be clearly seen.
https://css-tricks.com/technical-writing-for-developers/
The page can be captured with Evernote web clipper, exported to enex, and converted to Obsidian md with Yarle.

Copy link

Yihaa, thank you for reporting me this issue and to let me improve Yarle!

@akosbalasko
Copy link
Owner

Hi @sbsdevplus ,
Thank you for this issue, I released the fix in version https://github.com/akosbalasko/yarle/releases/tag/v6.0.4

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

No branches or pull requests

2 participants