Skip to content

Commit

Permalink
fix: Fix toc resolving for dir paths
Browse files Browse the repository at this point in the history
  • Loading branch information
3y3 committed Nov 5, 2024
1 parent c6fe709 commit 9099fb9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/services/tocs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@ function getForPath(path: string): [string | null, YfmToc | null] {
tocData = storage.get(path) || null;
}

if (!tocData && path.endsWith('index.yaml')) {
path = path.replace('index.yaml', '');
tocPath = paths.get(path) || null;
tocData = storage.get(path) || null;
}

return [tocPath, tocData];
}

Expand Down

0 comments on commit 9099fb9

Please sign in to comment.