Page 1 of 1

small bug with url highlighting

Posted: Mon Nov 01, 2010 4:04 pm
by Kelden
when i have a email address in a note, e.g.
aaa.bbb@ccc.com or aaa@ccc.com
only ccc.com is highlighted

Re: small bug with url highlighting

Posted: Mon Nov 01, 2010 7:37 pm
by hlop4ik
same bug
version 1.3

another bug:
www.qwe-rty.com - all is ok
www.Qwe-rty.com - only "rty.com" has blue color

www.qwerty.com - all is ok
www.Qwerty.com - link not detected

Re: small bug with url highlighting

Posted: Tue Nov 02, 2010 6:55 pm
by CintaNotes Developer
Confirmed, thanks.
Registered on the roadmap: http://roadmap.cintanotes.com/feedback/ ... ectly-v13/

Re: small bug with url highlighting

Posted: Tue Nov 02, 2010 11:48 pm
by hlop4ik
may i suggest a simple (and and may be stupid) algorithm of detecting links an e-mails in text

everything between "www." and nearest space is a link
"www.gsdfg5398yadf';[p=-0789789" is a link

and

everything between "http://" and nearest space is a link too
"http://546gfsdfgh\=45dsd48354.dsfsdf`e3" is a link

e-mail a little bit harder...
space, some symbols(not empty), "@", some symbols(not empty), ".", some symbols(not empty), space

so "8gd]\=\-@g]768.\=-=-" will be an e-mail address (not very good but simple and fast to fix a bug)

Re: small bug with url highlighting

Posted: Fri Nov 05, 2010 9:36 am
by CintaNotes Developer
hlop4ik, thanks for trying to help!
Unfortunately your algorithm won't work correctly in the following situations:
sample text sample text (http://cintanotes.com), sample sample
sample text http://link.com, sample sample
sample cintanotes.com sample

Actually only a minor tweak to the regex is needed for emails to be highlighted correctly.
A little bit more work is needed to actually open a mail client when URL is without the "mailto:" prefix. But it is also straightforward.
So this will be fixed in the next update.