mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-28 17:50:28 +08:00
Add link to code line numbers
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
This commit is contained in:
@@ -86,6 +86,11 @@ export function formatSeedAddress(id: string, host: string, port: number): strin
|
||||
return `${id}@${host}:${port}`;
|
||||
}
|
||||
|
||||
export function formatLocationHash(hash: string | null): number | null {
|
||||
if (hash && hash.match(/^#L[0-9]+$/)) return parseInt(hash.slice(2));
|
||||
return null;
|
||||
}
|
||||
|
||||
export function formatSeedId(id: string): string {
|
||||
return id.substring(0, 6)
|
||||
+ '…'
|
||||
|
||||
Reference in New Issue
Block a user