Skip to content

Commit

Permalink
lint: remove block padding
Browse files Browse the repository at this point in the history
  • Loading branch information
puzrin committed Dec 1, 2023
1 parent 04f5585 commit a909d41
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 10 deletions.
4 changes: 0 additions & 4 deletions index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ function createNormalizer () {
// Schemas compiler. Build regexps.
//
function compile (self) {

// Load & clone RE patterns.
const re = self.re = reFactory(self.__opts__)

Expand Down Expand Up @@ -447,7 +446,6 @@ LinkifyIt.prototype.test = function test (text) {
// if tld is located after found link - no need to check fuzzy pattern
if (this.__index__ < 0 || tld_pos < this.__index__) {
if ((ml = text.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null) {

shift = ml.index + ml[1].length

if (this.__index__ < 0 || shift < this.__index__) {
Expand All @@ -467,7 +465,6 @@ LinkifyIt.prototype.test = function test (text) {
// We can't skip this check, because this cases are possible:
// 192.168.1.1@gmail.com, my.in@example.com
if ((me = text.match(this.re.email_fuzzy)) !== null) {

shift = me.index + me[1].length
next = me.index + me[0].length

Expand Down Expand Up @@ -624,7 +621,6 @@ LinkifyIt.prototype.tlds = function tlds (list, keepOld) {
* Default normalizer (if schema does not define it's own).
**/
LinkifyIt.prototype.normalize = function normalize (match) {

// Do minimal possible changes by default. Need to collect feedback prior
// to move forward https://github.com/markdown-it/linkify-it/issues/1

Expand Down
1 change: 0 additions & 1 deletion support/demo_template/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ function updateResult () {
// Init on page load
//
$(function () {

// Restore content if opened by permalink
if (location.hash && /^(#t1=)/.test(location.hash)) {
$('.source').val(mdurl.decode(location.hash.slice(4), mdurl.decode.componentChars))
Expand Down
5 changes: 0 additions & 5 deletions test/test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const tlds = require('tlds')
let lines

describe('links', function () {

const l = linkify({ fuzzyIP: true })

l.normalize = function () {} // kill normalizer
Expand Down Expand Up @@ -48,11 +47,9 @@ describe('links', function () {
})
}
})

})

describe('not links', function () {

const l = linkify()

l.normalize = function () {} // kill normalizer
Expand All @@ -70,11 +67,9 @@ describe('not links', function () {
JSON.stringify((l.match(line) || [])[0]) + '`)')
})
})

})

describe('API', function () {

it('extend tlds', function () {
const l = linkify()

Expand Down

0 comments on commit a909d41

Please sign in to comment.