markdown_preview: Prevent stackoverflows in markdown parsing (#51637)

Fixes ZED-5TR

Release Notes:

- Fixed a stack overflow when parsing deeply nested html in markdown
files
a93c66e794Lukas Wirth committed on 3/16/2026, 7:43:56 AM· committed by GitHubparente5a69d8
3 files changedLine totals unavailable