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

Evernote Import - issue with link #318

Closed
foxmask opened this Issue Mar 21, 2018 · 10 comments

Comments

Projects
None yet
4 participants
@foxmask
Collaborator

foxmask commented Mar 21, 2018

Operating system

  • Windows
  • macOS
  • Linux
  • Android
  • iOS

Application

  • Desktop
  • Mobile
  • Terminal

After having imported my notes, the link are not well named.

Instead of having the original content of the anchor, we a link named "link"

@laurent22

This comment has been minimized.

Owner

laurent22 commented Mar 21, 2018

It normally does that for empty links. Again if you have an example ENEX please post it here.

@foxmask

This comment has been minimized.

Collaborator

foxmask commented Mar 21, 2018

to avoid to flood the issue I pasted one note here https://gist.github.com/foxmask/35e0c4bdebdafdfed5d7774b1c8bef95

@petrz12

This comment has been minimized.

Contributor

petrz12 commented Mar 21, 2018

Hi,
I can confirm that. It happens when the href and description are the same, when ENEX file contains e.g.: <a href="http://www.w3c.org">http://www.w3c.org</a>.

I tracked the problem to this line:

} else if (!previous || previous == url) {

Removing the part || previous == url should solve the problem.

Hope this helps.

@laurent22 laurent22 closed this in a677b2e Mar 23, 2018

@laurent22

This comment has been minimized.

Owner

laurent22 commented Mar 23, 2018

I've improved this on the Markdown side, but the rendered HTML will always display "(Link)" I'm afraid for URLs on their own, due to this: https://github.com/laurent22/joplin/blob/master/ReactNativeClient/lib/MdToHtml.js#L340

@foxmask

This comment has been minimized.

Collaborator

foxmask commented Mar 23, 2018

It's not a big deal. Thank you

@petrz12

This comment has been minimized.

Contributor

petrz12 commented Mar 23, 2018

Hi,
I just tried your latest fixes (commit 28dce0f) and I believe the link import or/and Markdown rendering is still not optimal yet. Since I use plain URLs almost exclusively in Evernote I started to investigate a bit. (Btw, what you have achieved with Joplin so far is an excellent job!)

Here is my Evernote x Joplin import comparison screenshot, I use ElectronClient on Mac:

links_evernote_x_joplin

Having (Link) instead of the real URL after import is very annoying here. Surprisingly, some text that is not supposed to be a link is rendered as link. That may suggest, that there is a problem with Markdown rendering.

Testing it further here on GitHub with handcrafted Markdown test:


Link Tests:

Links:

Not links:

  • some.test
  • some.text.com
  • filename
  • filename.link.is

Links:


And comparing the same with Joplin Markdown rendering:

links_joplin

Reveals differences between URL starting with "www" and with "http://" where the latter is rendered as "(Link)". Also e.g. "some.text.com" is rendered as a link even it should not be.

I would prefer if we can get close to GitHub Markup rendering since it is much more consistent and intuitive.

What do you think?

Thank you

@laurent22 laurent22 reopened this Mar 23, 2018

@laurent22 laurent22 added the question label Mar 23, 2018

@bayang

This comment has been minimized.

bayang commented Mar 24, 2018

this is very annoying for me as my daily use case is to consult list of plain links like this :

  • <www.myfirstlink.com>
  • <www.secondlink.com>

which displayed nice before as underlined 'www.secondlink.com' so at first glance I could see where I was clicking, now I see tens of '(Link)' and I need to always be in dual pane view
screen7

@laurent22

This comment has been minimized.

Owner

laurent22 commented Mar 24, 2018

Right, when used to store many urls like this, the (Link) thing is not a good idea. I'm going to change it back to display regular URLs.

@laurent22 laurent22 closed this in 74b83eb Mar 24, 2018

@bayang

This comment has been minimized.

bayang commented Mar 24, 2018

Thanks Laurent I appreciate that.

@petrz12

This comment has been minimized.

Contributor

petrz12 commented Mar 25, 2018

Laurent, it works for me as well. Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment