Skip to content

Commit

Permalink
fix(Hierarchy Note): 🐛 Forget to check for different delimiters in de…
Browse files Browse the repository at this point in the history
…pth()
  • Loading branch information
SkepticMystic committed Aug 21, 2021
1 parent 3ee2028 commit 7d54b88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ export default class BreadcrumbsPlugin extends Plugin {

const layers = noteContent.split("\n").filter((line) => line);

const depth = (line: string) => line.split("-")[0].length;
const depth = (line: string) => line.split(/[-\*\+]/)[0].length;

const depths = layers.map(depth);
const differences = [];
Expand Down

0 comments on commit 7d54b88

Please sign in to comment.