Skip to content
This repository was archived by the owner on Jul 3, 2020. It is now read-only.

Releases: zhouzi/linkhunter

v3.1.1

Choose a tag to compare

@zhouzi zhouzi released this 11 Sep 09:14
  • Fix hasProtocol to be case insensitive

v3.1.0

Choose a tag to compare

@zhouzi zhouzi released this 30 Jul 12:32
  • Improved regular expressions to avoid matching trailing punctuation marks and wrappers. Meaning it's now able to match:
    • site.com in (site.com), site.com., site.com..., site.com!, and so on.
    • site.com in Some string ((whatever(site.com)some stuff) there
    • someone@domain.com in Whatever (stuff((there(or(someone@domain.com)So weird) string...
  • Improved user-typed url regexp to match github.com/angular.js (urls with punctuation marks)
  • Improved regexp to match protocoled urls, no matter what's preceding it. It's now able to match http://site.com in What?http://site.com
  • Fixed urls regexps to avoid matching sub paths that do not start by a slash. It's no more matching site.com)whatever but site.com/whatever

v3.0.2

Choose a tag to compare

@zhouzi zhouzi released this 07 Jul 11:40
  • Fix angular filter's name.

v3.0.1

Choose a tag to compare

@zhouzi zhouzi released this 07 Jul 11:37
  • Renamed angular filter to linkhunterLinky.

v3.0.0

Choose a tag to compare

@zhouzi zhouzi released this 06 Jul 20:44
  • The usage of linkhunter as a constructor made no sense so it's now just an object exposing the whole API.
  • The LinkClass has been removed and each of its method has been transferred to linkhunter. It means that chaining operation is now much more simple and there's less concepts to learn.
  • linkhunter.linky()'s operation option has been replaced by individual properties that alter the link's display value (see documentation for more details).
  • The angular wrapper has been updated (module, service and filter renamed).
  • Added support for non-browser environment by following the UMD pattern.

v2.0.1

Choose a tag to compare

@zhouzi zhouzi released this 04 Jul 19:00
  • Update README.md on usage.
  • Update bower's ignore.

v2.0.0

Choose a tag to compare

@zhouzi zhouzi released this 04 Jul 18:54
  • mailto: is now considered to be emails' protocol, meaning Link('email@domain.com').withProtocol() now returns mailto:email@domain.com.
  • The targetBlank option of .linky() is replaced by target to allow any target value.
  • Improved the email matching.
    • It's now using the "domain pattern" regexp and match properly firstname.lastname@email.address-site.com.
    • Added more tests to the specs.
  • .getLinks() now ignore emails by default.
  • .looksLikeALink() now ignore emails by default.
  • Added the forceCleanUp option to .shorten() (true by default).
  • LinkHunter is now available as a bower component: bower install linkhunter.

Improve regexp matching

Choose a tag to compare

@zhouzi zhouzi released this 30 Jun 09:22
  • Lots of improvements in the regexp
    • Regular urls (the ones with a protocol) now also benefit from the domain pattern. Which means that everything that's before the first slash must looks like a domain name so http://. is no more matched for example.
    • Partial urls are no more matched by the "user typed" regexp. Meaning github.com/angular is no more matched from github.com/angular.js. In such case the url is completely dropped because:
      1. Matching partial urls is pointless and would surely lead to mistakes.
      2. We can't be sure whether what's behind the punctuation mark (the dot in this case) is part of the url or not.
  • Added a .replaceLinks(callback) method so your could benefit from LinkHunter's regexps to replace links the way you want to. This is method is now also used by .linky().
  • .linky() now supports more options like beautify, shorten and clean up.
  • Every link object has now a .originalHasProtocol property which is true when the original url has a protocol.
  • LinkHunter is now also available as an Angular module.
  • Fixed an issue where .getLinks() wasn't setting emails' type to "email".

First release

Choose a tag to compare

@zhouzi zhouzi released this 28 Jun 14:47
v1.0.0

update backlog for 1.1.0