Add link to code line numbers

Signed-off-by: Sebastian Martinez <sebastinez@me.com>
This commit is contained in:
Sebastian Martinez
2022-02-25 16:03:13 +01:00
committed by Alexis Sellier
parent 000e15c48a
commit a41c3cd293
6 changed files with 36 additions and 9 deletions
+5
View File
@@ -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)
+ '…'