mirror of
https://activitypub.software/TransFem-org/sfm-js
synced 2024-11-28 17:03:03 +00:00
hashtag can not include XML tags (#74)
This commit is contained in:
parent
fcd17d6eeb
commit
e6af8bc92a
2 changed files with 7 additions and 1 deletions
|
@ -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')];
|
||||
|
|
Loading…
Reference in a new issue