mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 18:20:30 +08:00
Show which line is highlighted
Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
@@ -15,11 +15,13 @@
|
||||
export let config: Config;
|
||||
export let hash: string | null = null;
|
||||
|
||||
const line = formatLocationHash(hash);
|
||||
const browse: proj.BrowseTo = { content, peer, path: "/", line };
|
||||
const browse: proj.BrowseTo = { content, peer, path: "/" };
|
||||
const head = project.branches[project.defaultBranch];
|
||||
|
||||
// route is passed when the URL has more params after e.g. /tree or /history
|
||||
// If line-number hash changes, we update the browser.
|
||||
$: browse.line = formatLocationHash(hash);
|
||||
|
||||
// `route` includes any unmatched path segments.
|
||||
$: if (route) {
|
||||
const { path, revision } = proj.parseRoute(route, project.branches);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user