Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/linkify/core/scanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ S_START
.on('}', makeState(CLOSEBRACE))
.on(']', makeState(CLOSEBRACKET))
.on(')', makeState(CLOSEPAREN))
.on([',', ';', '!', '"'], makeState(PUNCTUATION));
.on([',', ';', '!', '"', '\''], makeState(PUNCTUATION));

// Whitespace jumps
// Tokens of only non-newline whitespace are arbitrarily long
Expand Down
4 changes: 4 additions & 0 deletions test/spec/linkify/core/parser-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ var tests = [
'Url followed by nbsp: example.com/foo\u00a0bar',
[TEXT, URL, TEXT],
['Url followed by nbsp: ', 'example.com/foo', '\u00a0bar']
], [
'A link in \'singlequote.club/wat\' extra fluff at the end',
[TEXT, URL, TEXT],
['A link in \'', 'singlequote.club/wat', '\' extra fluff at the end']
]
];

Expand Down
4 changes: 2 additions & 2 deletions test/spec/linkify/core/scanner-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const tests = [
['&', [SYM], ['&']],
['&?<>(', [SYM, QUERY, SYM, SYM, OPENPAREN], ['&', '?', '<', '>', '(']],
['([{}])', [OPENPAREN, OPENBRACKET, OPENBRACE, CLOSEBRACE, CLOSEBRACKET, CLOSEPAREN], ['(', '[', '{', '}', ']', ')']],
['!,;', [PUNCTUATION, PUNCTUATION, PUNCTUATION], ['!', ',', ';']],
['!,;\'', [PUNCTUATION, PUNCTUATION, PUNCTUATION, PUNCTUATION], ['!', ',', ';', '\'']],
['hello', [DOMAIN], ['hello']],
['Hello123', [DOMAIN], ['Hello123']],
['hello123world', [DOMAIN], ['hello123world']],
Expand Down Expand Up @@ -70,7 +70,7 @@ const tests = [
['foo\u00a0bar', [TLD, WS, TLD], ['foo', '\u00a0', 'bar']], // nbsp
[
'Direniş İzleme Grubu\'nun',
[DOMAIN, SYM, WS, SYM, DOMAIN, WS, DOMAIN, SYM, DOMAIN],
[DOMAIN, SYM, WS, SYM, DOMAIN, WS, DOMAIN, PUNCTUATION, DOMAIN],
['Direni', 'ş', ' ', 'İ', 'zleme', ' ', 'Grubu', '\'', 'nun']
]
];
Expand Down