tsutsu3 / linkify-it-py

Links recognition library with full unicode support
Other
15 stars 8 forks source link

Schema key containing `-` not producing matches #25

Closed vesauimonen closed 3 years ago

vesauimonen commented 3 years ago

Problem

Schema key containing - is not producing any matches.

Reproduction

from linkify_it import LinkifyIt

linkify = LinkifyIt().add('foo-bar:', 'http:')
print(linkify.test('Check foo-bar://baz'))  # False

For comparison, the original linkify-it:

const linkify = require('linkify-it')();

linkify.add('foo-bar:', 'http:');
console.log(linkify.test('Check foo-bar://baz'));  // true
tsutsu3 commented 3 years ago

Thanks, I'll fix it.