Skip to content

Commit

Permalink
fixing domainChar accepted chars (#861)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugocostadev authored Oct 4, 2022
1 parent d1d5337 commit 90fee07
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/message-parser/src/grammar.pegjs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ domainName

domainNameLabel = $(domainChar+ $("-" domainChar+)*)

domainChar = !"\\" !"/" !"|" !">" !"<" !"%" !safe !extra !EndOfLine !Space .
domainChar
= !"\\" !"/" !"|" !">" !"<" !"%" !"`" !safe !extra !EndOfLine !Space .

/**
*
Expand Down
10 changes: 10 additions & 0 deletions packages/message-parser/tests/inlineCode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ test.each([
[paragraph([inlineCode(plain('[asd](https://localhost)'))])],
],
[`\`code\``, [paragraph([inlineCode(plain('code'))])]],
[
`File extension (\`.mov\`)`,
[
paragraph([
plain('File extension ('),
inlineCode(plain('.mov')),
plain(')'),
]),
],
],
])('parses %p', (input, output) => {
expect(parse(input)).toMatchObject(output);
});

0 comments on commit 90fee07

Please sign in to comment.