Skip to content
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

Revamped options utility #154

Merged
merged 3 commits into from
Aug 16, 2016
Merged

Revamped options utility #154

merged 3 commits into from
Aug 16, 2016

Conversation

nfrasser
Copy link
Owner

Features

  • Added ability to override default options via linkify.options.defaults
  • Options that take functions with value and type arguments can now be specified as objects, where each key is the target type. For example:
'github.com is #rad, please email nick@example.com'.linkify({
    formatHref: {
        email: (mailto) => `${mailto}?subject=Hello`,
        hashtag: (hashtag) => `https://twitter.com/hashtag/${hashtag.substr(1)}`
    }
});

Bug fixes

Deprecations

  • Deprecated linkClass option. Use className instead
  • Deprecated linkAttributes option. Use attributes instead.
  • The linkified default class name for links will no longer be provided in a future release

Breaking Changes

  • Fully removed deprecated newLine option

nfrasser added 3 commits August 14, 2016 23:33
Features

* Added ability to override default options via linkify.options.defaults
* Options that take functions with value and type arguments can now be
  specified as objects, where each key is the target type. For example:

```
'github.com is #rad, please email nick@example.com'.linkify({
    formatHref: {
        email: (mailto) => `${mailto}?subject=Hello`,
        hashtag: (hashtag) => `https://twitter.com/hashtag/${hashtag.substr(1)}`
    }
});
```

Bug fixes

* Allow disabling linkClass (by using default options) - Fixes #144

Deprecations

* Deprecated `linkClass` option. Use `className` instead
* Deprecated `linkAttributes` option. Use `attributes` instead.
* The `linkified` default class name for links will no longer be provided in a
  future release

Breaking Changes

* Fully removed deprecated `newLine` option
Including improvements and fixes for QUnit tests
@nfrasser nfrasser merged commit 2185b8a into master Aug 16, 2016
@nfrasser nfrasser deleted the options-type-hash branch August 17, 2016 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow disabling linkClass
1 participant