Skip to content

Commit

Permalink
refactor(template): refactor filtering logic
Browse files Browse the repository at this point in the history
  • Loading branch information
didimmova committed Apr 17, 2024
1 parent d139ee6 commit d48bb76
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/app/services/rendering/toc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,6 @@ export class TocRenderingService extends RenderingService implements ResizableOb
let parent = $(anchor).parent() as unknown as JQuery<HTMLLIElement>;
let parentNodes: JQuery<HTMLLIElement>[] = parent.parents<HTMLLIElement>("ul>li") as unknown as JQuery<HTMLLIElement>[];
let latest = parentNodes.length > 0 ? parentNodes[parentNodes.length - 1] : parent;
let header = $(latest).prevAll("li[data-is-header='true']").first();
parentNodes.push(header);
for (let i = 0; i < parentNodes.length; i++) {
let parentText;
let parentNode = $(parentNodes[i]);
Expand Down

0 comments on commit d48bb76

Please sign in to comment.