SIGN IN SIGN UP
rust-lang / rust UNCLAIMED

Empowering everyone to build reliable and efficient software.

0 0 65 Rust

Rollup merge of #155040 - yalagadapavankumar:fix-whitespace, r=JohnTitor

Fix code block whitespace handling in Markdown

### Fix Markdown code block closing whitespace handling

Previously, the parser incorrectly accepted closing backticks followed by extra text and rejected lines where only spaces appeared after closing backticks. This did not match expected Markdown behavior.

Now, the parser correctly ends a code block only when line after the code ends with spaces or nothing. Lines where extra text appears after the closing backticks are treated as part of the code block.

Includes tests for both correct and incorrect cases.

### Related issue

This PR addresses the Outreachy issue: [Markdown whitespace bug in Rust Compiler](https://github.com/rustfoundation/interop-initiative/issues/53)
J
Jonathan Brouwer committed
eec05ee3c29bdb84875594ca71f15fe0557ef95f
Committed by GitHub <noreply@github.com> on 4/10/2026, 1:33:15 PM