From 7d54b881b067560f5a3098155a9b4ac98f58697e Mon Sep 17 00:00:00 2001 From: Ross Keenan Date: Sat, 21 Aug 2021 21:01:55 +0200 Subject: [PATCH] fix(Hierarchy Note): :bug: Forget to check for different delimiters in depth() --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 82f2666b..3d9cda84 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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 = [];