fix: strip trailing whitespace in code blocks#606
Conversation
Trailing spaces, tabs, or blank lines inside a fenced code block rendered as phantom empty rows beneath the code because <pre> preserves whitespace verbatim. Trim them in the markdown renderer (server-side) and in the post-render JS enhancer (handles already-stored content without a migration).
|
Caution Review failedPull request was closed or merged during review WalkthroughThis change modifies code block rendering across both frontend and backend layers. The JavaScript enhancement adds preprocessing to replace trailing whitespace in the final text node of code blocks with a newline. Simultaneously, the Python markdown renderer adds a 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Uh oh!
There was an error while loading. Please reload this page.