ba-linkify.js: Update to latest commit from GitHub

The author decided to remove the license notice and add some trailing
whitespace, hooray.

Change-Id: Ibd72fe3364f5daed1d178ace0b52b6ab18f6da90
This commit is contained in:
Dave Borowitz
2018-03-26 11:03:02 -04:00
parent e2206e547a
commit 018481a119

View File

@@ -24,26 +24,49 @@
// Dual licensed under the MIT and GPL licenses. // Dual licensed under the MIT and GPL licenses.
// http://benalman.com/about/license/ // http://benalman.com/about/license/
// //
// Permission is hereby granted, free of charge, to any person // About: Examples
// obtaining a copy of this software and associated documentation //
// files (the "Software"), to deal in the Software without // This working example, complete with fully commented code, illustrates one way
// restriction, including without limitation the rights to use, // in which this code can be used.
// copy, modify, merge, publish, distribute, sublicense, and/or sell //
// copies of the Software, and to permit persons to whom the // Linkify - http://benalman.com/code/projects/javascript-linkify/examples/linkify/
// Software is furnished to do so, subject to the following //
// conditions: // About: Support and Testing
//
// Information about what browsers this code has been tested in.
//
// Browsers Tested - Internet Explorer 6-8, Firefox 2-3.7, Safari 3-4, Chrome, Opera 9.6-10.
//
// About: Release History
//
// 0.3 - (6/27/2009) Initial release
// The above copyright notice and this permission notice shall be // Function: linkify
// included in all copies or substantial portions of the Software. //
// Turn text into linkified html.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, //
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES // Usage:
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND //
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT // > var html = linkify( text [, options ] );
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, //
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // Arguments:
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR //
// OTHER DEALINGS IN THE SOFTWARE. // text - (String) Non-HTML text containing links to be parsed.
// options - (Object) An optional object containing linkify parse options.
//
// Options:
//
// callback (Function) - If specified, this will be called once for each link-
// or non-link-chunk with two arguments, text and href. If the chunk is
// non-link, href will be omitted. If unspecified, the default linkification
// callback is used.
// punct_regexp (RegExp) - A RegExp that will be used to trim trailing
// punctuation from links, instead of the default. If set to null, trailing
// punctuation will not be trimmed.
//
// Returns:
//
// (String) An HTML string containing links.
window.linkify = (function(){ window.linkify = (function(){
var var