[MFM] Better hashtag parsing: Ignore single quotation

This commit is contained in:
syuilo 2019-01-17 09:33:08 +09:00
parent 9740db8685
commit cb6a4037f2
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
2 changed files with 9 additions and 1 deletions

View file

@ -365,6 +365,14 @@ describe('MFM', () => {
]);
});
it('ignore single quote', () => {
const tokens = analyze('#foo\'');
assert.deepStrictEqual(tokens, [
leaf('hashtag', { hashtag: 'foo' }),
text('\''),
]);
});
it('ignore double quote', () => {
const tokens = analyze('#foo"');
assert.deepStrictEqual(tokens, [