GithubHelp home page GithubHelp logo

URL detection is too aggressive about folio HOT 6 OPEN

kuiperzone avatar kuiperzone commented on August 19, 2024
URL detection is too aggressive

from folio.

Comments (6)

toolstack avatar toolstack commented on August 19, 2024 1

Perhaps, but I really want to rewrite the regex processor anyway at some point so don't want to put a whole lot of effort into playing whack a mole with the existing one.

from folio.

toolstack avatar toolstack commented on August 19, 2024 1

I was thinking of adding a disable url detection option, so I don't see that being an issue.

Unfortunately url detection is a messy business in free form text, so it's never going to be perfect.

I might do a three way selector; aggressive, strict, disable.

Strict would require a proper protocol part to exist (aka https://, etc.) before it was identified as a url.

from folio.

toolstack avatar toolstack commented on August 19, 2024

I'm not surprise there are a few false positives, url detection is challenging in unstructured text.

I had it checking for :// but that excluded too much.

I'll take another look and see if it can be tuned a little more, otherwise I'm thinking that erring on the side of too many matches is better than too few.

from folio.

kuiperzone avatar kuiperzone commented on August 19, 2024

Hey thanks for the reply!

While I don't want to suggest an option for every problem...

Perhaps there could be an option for auto-detect links with 3 states:

  1. Disabled
  2. Cautious/Normal (using ://)
  3. Aggressive/Verbose (as current)

?

from folio.

kuiperzone avatar kuiperzone commented on August 19, 2024

If we cannot have a robust URL detector, can we at least disable the auto URL detection. I don't actually see it as useful, but understand others might.

I guess this is content specific, but if you are keeping IT related notes than more than half of "URLs" will be false positives.

It falsely detects the following as URLs:

ISO times
filenames
version numbers
namespaces
Anything with a period in it

from folio.

kuiperzone avatar kuiperzone commented on August 19, 2024

Good stuff!

Aggressive and strict? That doesn't sound fun. I'll be selecting disabled then. :)

from folio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.