Using 'word'.id creates a link

Testing version:
Not a testing version, 2.09 – macOS non-pro version
didn’t know where else to report this.

What were you doing: typing ‘Plant.ID’

What feature did you use: keyboard input

What happened: A link was immediately created and text turned ‘blue’. Clicking on that link accessed the website that is Plant.ID. Further testing proved that any word with ‘.id’ or ‘.ID’ as suffix creates a link.

if there is a website with that URL the click opens it in default web browser.

What did you expect to happen: text displaying what i typed

Bear automatically makes text that looks like links clickable as you describe. The problem is that it is not easy to know for certain what is intended to be a link or not. In your case, what you wrote is a valid URL and it is even a web site.

Having links clickable is a nice feature, but having things that are not intended to be a link highlighted is an annoyance. I will think about it to see if we can improve on this.

Thanks for the feedback!

Also, one thing you can do is to add a backslash before the dot to escape it (Plant\.ID).

1 Like

This is also an issue for many sort of paragraph references. For instance, try entering text like the following and it will unfortunately get converted into a hyperlink in Bear - a hyperlink that of course leads nowhere.

T-29.VI.1.
T-29.VI.2.
etc.

What’s really weird is that if you change the VI to V, then no hyperlink.

Additionally, references like the following are also converted into useless hyperlinks:

T-25.in.2

Same as above that if you change in to some other text like ix then no hyperlink.

So Bear has some weird logic about what it thinks should be a hyperlink and what should not be one.

It would be nice if ‘auto-hyperlinking’ were limited to standard TLDs.

Good feedback! It is helpful with more examples of things that aren’t links that are highlighted.

The logic isn’t as weird as you think. Bear has a list of all top level domains that it checks against. .vi is a top level domain but .v isn’t.

In the above example, we could use the fact that the string doesn’t end with the top level domain to exclude it from the link pattern. Perhaps we could also have a requirement to only use lowercase letters for the less common top level domains.

I think checking if the text ends with a lowercase TLD would be a great filter. Thank you!

I have made URL parsing a bit more restrictive to solve the above cases. Will be part of the next release.

1 Like

The automatic linking of things that look like domains is not working too well for me in Bear.

For example, I want to mention a file that is named foo.properties but evidently that is a TLD targeted towards real estate developers. So it becomes clickable in my note. Same thing for shell script names, foo.sh - this is a legit TLD.

I like the helpful feature where I can paste a URL onto selected text, but not these auto links.

Maybe auto hyperlinking as you type should only happen if a string is prefixed by a protocol like https:// ?

Like many apps today, we try to be helpful by linking to something that could be a link. So, if you write “uber.com”, it gets linked automatically. In most cases, this will work well, but with all the top-level domains that exist today, there will be examples where we link things that are not meant to be links. We are trying to find a balance where we make the right choice most of the time.

We could restrict auto-linking to only recognize the most common top-level domains, but then some users will be wondering why some of their domains don’t get linked.

I will add your examples to our list of “false positives”. When we have collected more data we might find a good way to make auto-linking more restrictive.

In the meantime, you can mark your file names as inline code (`foo.sh`). Or you can escape the dot with a backslash (foo\.sh).

2 Likes

Thanks for the response and for the workarounds. I first noticed it when pasting a chunk of text containing some of the faux TLDs. I could go through and tweak the text to avoid the auto links, but it’s not worth the effort for me mostly, since these are personal notes and not intended for publishing.

I realize you would not want to clutter up the Settings, but given the proliferation of TLDs and the wide range of use cases for Bear users, I think the thing that makes the most sense is to consider an option to allow automatic links only when they begin with the protocol designator. (Those are unambiguous and linking would be welcome.)

Thanks again!