Skip to content
Snippets Groups Projects
Unverified Commit e6af8bc9 authored by Johann150's avatar Johann150 Committed by GitHub
Browse files

hashtag can not include XML tags (#74)

parent fcd17d6e
No related branches found
No related tags found
No related merge requests found
......@@ -355,7 +355,7 @@ hashtagBracketPair
/ "「" hashtagContent* "」"
hashtagChar
= ![ \t.,!?'"#:\/\[\]【】()「」] CHAR
= ![ \t.,!?'"#:\/\[\]【】()「」<>] CHAR
// inline: URL
......
......@@ -716,6 +716,12 @@ hoge`;
assert.deepStrictEqual(mfm.parse(input), output);
});
it('ignore angle bracket', () => {
const input = '#foo<bar>';
const output = [HASHTAG('foo'), TEXT('<bar>')];
assert.deepStrictEqual(mfm.parse(input), output);
});
it('allow including number', () => {
const input = '#foo123';
const output = [HASHTAG('foo123')];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment