You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix renderer crash on extremely deeply nested markdown content
6
+
7
+
Previously, rendering markdown with extremely deeply nested content (e.g., thousands of nested bold markers like `****************...text...****************`) would cause a stack overflow crash. The renderer now gracefully handles such edge cases by falling back to plain text rendering instead of crashing.
8
+
9
+
**Technical details:**
10
+
11
+
- Added render depth tracking to prevent stack overflow
12
+
- Graceful fallback at 2500 levels of nesting (way beyond normal usage)
13
+
- Try/catch safety net as additional protection for unexpected errors
14
+
- Zero performance impact during normal operation
15
+
- Prevents crashes while maintaining O(n) parsing complexity
16
+
17
+
This fix ensures stability even with adversarial or malformed inputs while having no impact on normal markdown documents.
0 commit comments