Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminate TOC recursion on full filepath match #10353

Merged
merged 1 commit into from
Jan 29, 2025
Merged

Conversation

ganicke
Copy link
Collaborator

@ganicke ganicke commented Jan 25, 2025

The TOC/breadcrumb match is relying on an indexOf() == 0 check instead of a full string match. Therefore a path string of code-eval-tool will match both of the TOC entries for code-eval-tool and code with a recursive TOC lookup. This will render an aggregated breadcrumb of both the TOC entries.

Note: The fix included here is a suggestion for a full path match. You can offer better or more efficient check.

Closes microsoft/pxt-microbit#6069

@ganicke ganicke requested a review from abchatra January 25, 2025 04:03
@ganicke ganicke changed the title Terminate on TOC recursion on full filepath match Terminate TOC recursion on full filepath match Jan 25, 2025
@abchatra abchatra requested a review from riknoll January 28, 2025 17:09
@abchatra
Copy link
Collaborator

Thanks so much @ganicke. We will review this today.

Copy link
Member

@riknoll riknoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this TOC code is always a mystery to me but this change looks good!

@abchatra abchatra merged commit 74b7678 into master Jan 29, 2025
7 checks passed
@abchatra abchatra deleted the toc-recursion-stop branch January 29, 2025 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Breadcrumb for Code Eval docs
3 participants