Skip to content

Commit 527e388

Browse files
committed
fix: update cspell to parse IPFS/IPNS urls
1 parent 89a20a1 commit 527e388

File tree

2 files changed

+23
-10
lines changed

2 files changed

+23
-10
lines changed

cspell.json

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,23 @@
3737
"/CID(.*)/",
3838

3939
// string CIDs are not spell checked
40-
"'baf(.*)'",
41-
"\"baf(.*)\"",
42-
"'Qm(.*)'",
43-
"\"Qm(.*)\"",
40+
"baf[a-zA-Z1-9\/]+", // base32 encoded libp2p-key
41+
"bae[a-zA-Z1-9\/]+", // base32 encoded identity
42+
"Qm[a-zA-Z1-9\/]+", // base58btc encoded (no multibase)
4443

4544
// string PeerIds are not spell checked
46-
"'12D3Koo(.*)'", // Ed25519
47-
"\"12D3Koo(.*)\"", // Ed25519
48-
"'16Uiu(.*)'", // secp256k1
49-
"\"16Uiu(.*)\"", // secp256k1
50-
"'k51(.*)'", // base36 PeerId as CID
51-
"\"k51(.*)\"" // base36 PeerId as CID
45+
"12D3Koo[a-zA-Z1-9\/]+", // Ed25519
46+
"16Uiu[a-zA-Z1-9\/]+", // secp256k1
47+
"k51[a-zA-Z1-9\/]+", // base36 ed PeerId as CID
48+
"kzw[a-zA-Z1-9\/]+", // base36 secp PeerId as CID
49+
"k2k[a-zA-Z1-9\/]+", // base36 rsa PeerId as CID
50+
51+
"/ipfs/[a-zA-Z1-9\/]+", // IPFS paths
52+
"ipfs://[a-zA-Z1-9\/]+", // IPFS URLs
53+
"/ipns/[a-zA-Z1-9\/\\.]+", // IPNS names
54+
"ipns://[a-zA-Z1-9\/\\.]+", // IPNS URLs
55+
56+
"AAE[a-zA-Z1-9\/]+", // base64 data
57+
"%[a-fA-F0-9]{2}" // URL encoded characters
5258
]
5359
}

dictionaries/ipfs.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,3 +275,10 @@ avds
275275
askpass
276276
mdast
277277
conventionalcommits
278+
ipip
279+
pathing
280+
parseable
281+
dweb
282+
tlru
283+
hashlru
284+
peerid

0 commit comments

Comments
 (0)