diff --git a/src/App/Header/Search.svelte b/src/App/Header/Search.svelte index b4c7ac5a1..c7593b0b8 100644 --- a/src/App/Header/Search.svelte +++ b/src/App/Header/Search.svelte @@ -55,7 +55,6 @@ id: project.id, peer: undefined, baseUrl, - hash: undefined, }, }); } else { diff --git a/src/components/Markdown.svelte b/src/components/Markdown.svelte index 53533026b..4b9140901 100644 --- a/src/components/Markdown.svelte +++ b/src/components/Markdown.svelte @@ -11,7 +11,6 @@ import { Renderer } from "@app/lib/markdown"; export let content: string; - export let hash: string | undefined = undefined; // If present, resolve all relative links with respect to this URL export let linkBaseUrl: string | undefined = undefined; export let path: string = "/"; @@ -69,8 +68,6 @@ } } - if (hash) scrollIntoView(hash); - // Iterate over all images, and replace the source with a canonicalized URL // pointing at the projects /raw endpoint. if (rawPath) { @@ -112,6 +109,10 @@ } await Promise.allSettled(treeChanges); + + if (window.location.hash) { + scrollIntoView(window.location.hash.substring(1)); + } }); diff --git a/src/views/projects/Blob.svelte b/src/views/projects/Blob.svelte index 2b83212c2..49a971e87 100644 --- a/src/views/projects/Blob.svelte +++ b/src/views/projects/Blob.svelte @@ -16,7 +16,6 @@ export let peer: string | undefined; export let revision: string | undefined; export let path: string; - export let hash: string | undefined = undefined; export let blob: Blob; export let highlighted: Syntax.Root | undefined; export let rawPath: string; @@ -267,8 +266,7 @@ {revision} content={blob.content} {rawPath} - {path} - {hash} /> + {path} /> {:else if content}