Skip to content

Commit

Permalink
📦 Update search dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanc1 committed Sep 24, 2024
1 parent 701dda8 commit 46aa138
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 59 deletions.
5 changes: 5 additions & 0 deletions .changeset/late-doors-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"myst-cli": patch
---

Update unist-util-visit deps
56 changes: 0 additions & 56 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions packages/myst-cli/src/process/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export function toSectionedParts(content: GenericNode) {
newSection();
visit(
content,
(node: GenericNode, index: number | undefined, parent: GenericNode | undefined) => {
(node: GenericNode, index: number | null | undefined, parent: GenericNode | undefined) => {
if (node.type === 'heading') {
newSection(node as Heading);
}
Expand All @@ -60,8 +60,8 @@ export function toSectionedParts(content: GenericNode) {

// Separate non-inline block elements in terms of the bottom element
if (
index !== undefined &&
parent !== undefined &&
index != null &&
parent != null &&
// Skip literal nodes
'children' in node &&
// Skip inline-block nodes
Expand Down

0 comments on commit 46aa138

Please sign in to comment.