Only match entities not embedded in links #44
Annotations
6 errors and 1 warning
src/__tests__/parser.test.ts > parseNote() > Should assert content with multiple nodes:
src/__tests__/parser.test.ts#L188
Error: Snapshot `parseNote() > Should assert content with multiple nodes 1` mismatched
- Expected
+ Received
@@ -35,36 +35,32 @@
},
],
"text": "#tag",
"type": "text",
},
- {
- "text": " ",
- "type": "text",
- },
],
"type": "paragraph",
},
{
"attrs": {
"author": "0a5a87baeead12b08c0c026caa46c009bb533aae1bd1681f52d609dd2b6fd8bc",
"id": "2ceb90d42ab5a19b76dddfbda45687bc8011917a41286783edd14ca690fd86ee",
"kind": null,
- "nevent": "nostr:nevent1qgsq5k58hth26y4s3sxqym92gmqqnw6n82hph5tgrafdvzwa9dha30qqyqkwhyx59266rxmkmh0mmfzks77gqyv30fqjseurahg5ef5slkrwuzwpwzp",
+ "nevent": " nostr:nevent1qgsq5k58hth26y4s3sxqym92gmqqnw6n82hph5tgrafdvzwa9dha30qqyqkwhyx59266rxmkmh0mmfzks77gqyv30fqjseurahg5ef5slkrwuzwpwzp",
"relays": [],
},
"type": "nevent",
},
{
"content": [
{
- "text": " Hi ",
+ "text": " Hi",
"type": "text",
},
{
"attrs": {
- "nprofile": "nostr:nprofile1qy28wumn8ghj7un9d3shjtnyv9kh2uewd9hsqgq2t2rm4m4dz2cgcrqzdj4ydsqfhdfn4tsm695p75kkp8wjkm7chsuhqyfh",
+ "nprofile": " nostr:nprofile1qy28wumn8ghj7un9d3shjtnyv9kh2uewd9hsqgq2t2rm4m4dz2cgcrqzdj4ydsqfhdfn4tsm695p75kkp8wjkm7chsuhqyfh",
"pubkey": "0a5a87baeead12b08c0c026caa46c009bb533aae1bd1681f52d609dd2b6fd8bc",
"relays": [
"wss://relay.damus.io",
],
},
❯ src/__tests__/parser.test.ts:188:30
|
src/__tests__/parser.test.ts > parseNote() > Should assert a nostr links inside markdown:
src/__tests__/parser.test.ts#L462
Error: Snapshot `parseNote() > Should assert a nostr links inside markdown 1` mismatched
- Expected
+ Received
@@ -4,16 +4,16 @@
"attrs": {
"level": 3,
},
"content": [
{
- "text": "Test ",
+ "text": "Test",
"type": "text",
},
{
"attrs": {
- "nprofile": "nostr:nprofile1qqsvvcpmpuwvlmrztkwq3d6nunmhf6hh688jw6fzxyjmtl2d5u5qr8spz3mhxue69uhhyetvv9ujuerpd46hxtnfdufzkeuj",
+ "nprofile": " nostr:nprofile1qqsvvcpmpuwvlmrztkwq3d6nunmhf6hh688jw6fzxyjmtl2d5u5qr8spz3mhxue69uhhyetvv9ujuerpd46hxtnfdufzkeuj",
"pubkey": "c6603b0f1ccfec625d9c08b753e4f774eaf7d1cf2769223125b5fd4da728019e",
"relays": [
"wss://relay.damus.io",
],
},
❯ src/__tests__/parser.test.ts:462:38
|
src/__tests__/parser.test.ts > parseNote() > Should assert an intersecting node:
src/__tests__/parser.test.ts#L578
Error: Snapshot `parseNote() > Should assert an intersecting node 1` mismatched
- Expected
+ Received
@@ -16,83 +16,30 @@
"target": "_blank",
},
"type": "link",
},
],
- "text": "https://github.com/",
- "type": "text",
- },
- {
- "attrs": {
- "nprofile": "nostr:npub1cesrkrcuelkxyhvupzm48e8hwn4005w0ya5jyvf9kh75mfegqx0q4kt37c",
- "pubkey": "c6603b0f1ccfec625d9c08b753e4f774eaf7d1cf2769223125b5fd4da728019e",
- "relays": [],
- },
- "type": "nprofile",
- },
- {
- "marks": [
- {
- "attrs": {
- "class": null,
- "href": "https://github.com/nostr:npub1cesrkrcuelkxyhvupzm48e8hwn4005w0ya5jyvf9kh75mfegqx0q4kt37c/wrong/link/",
- "rel": "noopener noreferrer nofollow",
- "target": "_blank",
- },
- "type": "link",
- },
- ],
- "text": "/wrong/link/",
- "type": "text",
- },
- {
- "text": " text ",
- "type": "text",
- },
- {
- "marks": [
- {
- "attrs": {
- "class": null,
- "href": "https://github.com/nostr:nevent1qgsq5k58hth26y4s3sxqym92gmqqnw6n82hph5tgrafdvzwa9dha30qqyqkwhyx59266rxmkmh0mmfzks77gqyv30fqjseurahg5ef5slkrwuzwpwzp/error",
- "rel": "noopener noreferrer nofollow",
- "target": "_blank",
- },
- "type": "link",
- },
- ],
- "text": "https://github.com/",
- "type": "text",
- },
- ],
- "type": "paragraph",
- },
- {
- "attrs": {
- "author": "0a5a87baeead12b08c0c026caa46c009bb533aae1bd1681f52d609dd2b6fd8bc",
- "id": "2ceb90d42ab5a19b76dddfbda45687bc8011917a41286783edd14ca690fd86ee",
- "kind": null,
- "nevent": "nostr:nevent1qgsq5k58hth26y4s3sxqym92gmqqnw6n82hph5tgrafdvzwa9dha30qqyqkwhyx59266rxmkmh0mmfzks77gqyv30fqjseurahg5ef5slkrwuzwpwzp",
- "relays": [],
- },
- "type": "nevent",
- },
- {
- "content": [
- {
- "marks": [
- {
- "attrs": {
- "class": null,
- "href": "https://github.com/nostr:nevent1qgsq5k58hth26y4s3sxqym92gmqqnw6n82hph5tgrafdvzwa9dha30qqyqkwhyx59266rxmkmh0mmfzks77gqyv30fqjseurahg5ef5slkrwuzwpwzp/error",
- "rel": "noopener noreferrer nofollow",
- "target": "_blank",
- },
- "type": "link",
- },
- ],
- "text": "/error",
+ "text": "https://github.com/nostr:npub1cesrkrcuelkxyhvupzm48e8hwn4005w0ya5jyvf9kh75mfegqx0q4kt37c/wrong/link/",
+ "type": "text",
+ },
+ {
+ "text": " text ",
+ "type": "text",
+ },
+ {
+ "marks": [
+ {
+ "attrs": {
+ "class": null,
+ "href": "https://github.com/nostr:nevent1qgsq5k58hth26y4s3sxqym92gmqqnw6n82hph5tgrafdvzwa9dha30qqyqkwhyx59266rxmkmh0mmfzks77gqyv30fqjseurahg5ef5slkrwuzwpwzp/error",
+ "rel": "noopener noreferrer nofollow",
+ "target": "_blank",
+ },
+ "type": "link",
+ },
+ ],
+ "text": "https://github.com/nostr:nevent1qgsq5k58hth26y4s3sxqym92gmqqnw6n82hph5tgrafdvzwa9dha30qqyqkwhyx59266rxmkmh0mmfzks77gqyv30fqjseurahg5ef5slkrwuzwpwzp/error",
"type": "text",
},
{
"text": " link",
"type": "text",
❯ src/__tests__/parser.test.ts:578:30
|
src/__tests__/parser.test.ts > parseNote() > Should assert a nostr:naddr1:
src/__tests__/parser.test.ts#L694
Error: Snapshot `parseNote() > Should assert a nostr:naddr1 1` mismatched
- Expected
+ Received
@@ -1,21 +1,21 @@
{
"content": [
{
"content": [
{
- "text": "Test addr ",
+ "text": "Test addr",
"type": "text",
},
],
"type": "paragraph",
},
{
"attrs": {
"identifier": "Here Comes Bitcoin by Spiral",
"kind": 30030,
- "naddr": "nostr:naddr1qqwysetjv5syxmmdv4ejqsnfw33k76twyp38jgznwp5hyctvqgsph3c2q9yt8uckmgelu0yf7glruudvfluesqn7cuftjpwdynm2gygrqsqqqa2w4ua43m",
+ "naddr": " nostr:naddr1qqwysetjv5syxmmdv4ejqsnfw33k76twyp38jgznwp5hyctvqgsph3c2q9yt8uckmgelu0yf7glruudvfluesqn7cuftjpwdynm2gygrqsqqqa2w4ua43m",
"pubkey": "1bc70a0148b3f316da33fe3c89f23e3e71ac4ff998027ec712b905cd24f6a411",
"relays": [],
},
"type": "naddr",
},
❯ src/__tests__/parser.test.ts:694:30
|
src/__tests__/parser.test.ts > parseNote() > Should assert setEventContentKind0:
src/__tests__/parser.test.ts#L734
Error: Snapshot `parseNote() > Should assert setEventContentKind0 1` mismatched
- Expected
+ Received
@@ -27,32 +27,36 @@
},
{
"marks": [
{
"attrs": {
- "tag": "#nostr",
+ "tag": "#nostr",
},
"type": "tag",
},
],
"text": "#nostr",
"type": "text",
},
{
- "text": " ",
- "type": "text",
- },
- {
"attrs": {
- "nprofile": "nostr:nprofile1qy88wumn8ghj7mn0wvhxcmmv9uq32amnwvaz7tmjv4kxz7fwv3sk6atn9e5k7tcprfmhxue69uhhyetvv9ujuem9w3skccne9e3k7mf0wccsqgxxvqas78x0a339m8qgkaf7fam5atmarne8dy3rzfd4l4x6w2qpncmfs8zh",
+ "nprofile": " nostr:nprofile1qy88wumn8ghj7mn0wvhxcmmv9uq32amnwvaz7tmjv4kxz7fwv3sk6atn9e5k7tcprfmhxue69uhhyetvv9ujuem9w3skccne9e3k7mf0wccsqgxxvqas78x0a339m8qgkaf7fam5atmarne8dy3rzfd4l4x6w2qpncmfs8zh",
"pubkey": "c6603b0f1ccfec625d9c08b753e4f774eaf7d1cf2769223125b5fd4da728019e",
"relays": [
"wss://nos.lol/",
"wss://relay.damus.io/",
"wss://relay.getalby.com/v1",
],
},
+ "marks": [
+ {
+ "attrs": {
+ "tag": "#nostr",
+ },
+ "type": "tag",
+ },
+ ],
"type": "nprofile",
},
{
"text": " ",
"type": "text",
❯ src/__tests__/parser.test.ts:734:39
|
checks (18)
Process completed with exit code 1.
|
checks (18)
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, pnpm/action-setup@v2, actions/setup-node@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|