Depth limit exceeded on non-malicious markdown content
Open
Nobody has claimed this yet.
bug
- Dominant language
- C#
- Stars
- 5.3k
- Forks
- 510
- Avg merge
- 8d 5h
- Merged PRs (30d)
- 5
Description
This file raises depth limit exceeded exception in version 0.23.0 due to #500.
Some additional info:
- That file is an auto generated API reference page.
- I cannot give a reasonable depth limit that don't break all content in docs.microsoft.com, but a depth limit configuration is a good start to mitigate the problem.
- I did some perf profiling of markdig on a bunch of real markdown files used by docs.microsoft.com and the hottest function inside markdig is
FindLastContainer. I don't have enough time to dig deeper, not sure if there are faster ways to find the last container (like tracking its location instead of search the tree each time?)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the depth-limit exception with the linked autogenerated markdown file, then inspect FindLastContainer and the changes from #500. Done means non-malicious documentation content no longer fails unexpectedly, with any depth-limit mitigation behaving as intended and its performance impact understood.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- performance, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100