Skip to content

Commit

Permalink
chore(message-parser): Accept urls starting with numbers (#890)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo authored Nov 3, 2022
1 parent 14d2de1 commit d6e7135
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/message-parser/src/grammar.pegjs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ URL

urlScheme
= $(
[[A-Za-z]
[[A-Za-z0-9+.-]
[A-Za-z0-9+.-]
[A-Za-z0-9+.-]?
[A-Za-z0-9+.-]?
Expand Down
4 changes: 4 additions & 0 deletions packages/message-parser/tests/url.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ test.each([
]),
],
],
[
'https://1developer.rocket.chat',
[paragraph([link('https://1developer.rocket.chat')])],
],
])('parses %p', (input, output) => {
expect(parse(input)).toMatchObject(output);
});
Expand Down

0 comments on commit d6e7135

Please sign in to comment.