diff --git a/src/internal/parser.pegjs b/src/internal/parser.pegjs index acf1b8abc5b83217ecc10a18f8a30c9728297164..fda5a19b821d77a7f3060ef6464a593f47f05592 100644 --- a/src/internal/parser.pegjs +++ b/src/internal/parser.pegjs @@ -389,11 +389,6 @@ altUrlFormat { return text(); } -// URL scheme as defined in https://url.spec.whatwg.org/#url-scheme-string - / [a-zA-Z] [-a-zA-Z0-9+.]* ":" (!(">" / _) CHAR)+ -{ - return text(); -} // inline: link @@ -417,11 +412,6 @@ linkLabelPart linkUrl = url { return text(); } -// URL scheme as defined in https://url.spec.whatwg.org/#url-scheme-string - / [a-zA-Z] [-a-zA-Z0-9+.]* ":" (!(")" / _) CHAR)+ -{ - return text(); -} // inline: fn diff --git a/test/parser.ts b/test/parser.ts index ea619697889938539eccca625b1cbc68c9781f04..88d62cd8dab9953b082ab72e3e8261c4aea0270c 100644 --- a/test/parser.ts +++ b/test/parser.ts @@ -882,22 +882,6 @@ hoge`; ]; assert.deepStrictEqual(mfm.parse(input), output); }); - - it('do not match other schemes in url withouth angle brackets', () => { - const input = 'oops:url'; - const output = [ - TEXT('oops:url'), - ]; - assert.deepStrictEqual(mfm.parse(input), output); - }); - - it('match other schemes in url with angle brackets', () => { - const input = '<gemini://example.com>'; - const output = [ - N_URL('gemini://example.com', true), - ]; - assert.deepStrictEqual(mfm.parse(input), output); - }); }); describe('link', () => { @@ -978,16 +962,6 @@ hoge`; ]; assert.deepStrictEqual(mfm.parse(input), output); }); - - it('match other schemes without angle brackets', () => { - const input = '[send email](mailto:nobody@example.com?subject=test)'; - const output = [ - LINK(false, 'mailto:nobody@example.com?subject=test', [ - TEXT('send email') - ]), - ]; - assert.deepStrictEqual(mfm.parse(input), output); - }); }); describe('fn v1', () => {