File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 66 export let frontmatter = {}
77
88 let prev, next
9- $: normalizedPath = normalizePath ($page .path )
9+ $: markdownPath = normalizePath ($page .path ). replace ( / ^ \/ | \/ $ / g , " " )
1010 $: {
1111 let prevItem, currItem
1212 for (const item of iterateMenuItem ($menuItems)) {
4242 <div class =" footer-tools" >
4343 <div class =" edit-link" >
4444 <a
45- href ="https://github.com/ota-meshi/eslint-plugin-svelte/edit/main/docs/ {normalizedPath .startsWith (
46- ' /' ,
47- )
48- ? normalizedPath .slice (1 )
49- : normalizedPath }.md"
45+ href ="https://github.com/ota-meshi/eslint-plugin-svelte/edit/main/docs/ {markdownPath }.md"
5046 target =" _blank"
5147 rel =" noopener noreferrer" >Edit this page</a
5248 >
Original file line number Diff line number Diff line change @@ -57,7 +57,11 @@ export function isActive(path, $page) {
5757}
5858
5959export function normalizePath ( path ) {
60- return path === "/" ? "/README" : path
60+ let normalized = path === "/" ? "/README/" : path
61+ if ( ! normalized . endsWith ( "/" ) ) {
62+ normalized += "/"
63+ }
64+ return normalized
6165}
6266
6367export const tocStore = writable ( [ ] )
You can’t perform that action at this time.
0 commit comments