File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
apps/svelte.dev/src/routes/docs/[...path] Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 3232 return ;
3333 }
3434
35- const id = hash .toLowerCase ().replaceAll (' :' , ' -' );
35+ // kit/svelte4 replaced `:` character
36+ // e.g. we want to redirect progressive-enhancement-use-enhance to Progressive-enhancement-use:enhance
37+ // kit docs also had types in URL that we want to replace. e.g.
38+ // https://kit.svelte.dev/docs/types#public-types-loadevent
39+ // https://kit.svelte.dev/docs/types#private-types-cspdirectives
40+ const id = hash
41+ .toLowerCase ()
42+ .replaceAll (' :' , ' -' )
43+ .replaceAll (' public-types-' , ' ' )
44+ .replaceAll (' private-types-' , ' ' );
3645
3746 for (const heading of content .querySelectorAll (' [id]' )) {
38- // e.g. we want to redirect progressive-enhancement-use-enhance to Progressive-enhancement-use:enhance
3947 if (heading .id .toLowerCase ().replaceAll (' :' , ' -' ) === id ) {
4048 goto (` #${heading .id } ` , {
4149 replaceState: true
You can’t perform that action at this time.
0 commit comments