rustdoc_to_markdown: Fix code blocks (#12460)

This PR fixes an issue in `rustdoc_to_markdown` with code blocks being
trimmed incorrectly.

We were erroneously popping from the current element stack even if we
didn't push an element onto the stack.

Added test coverage for this case as well, so we don't regress.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers
2024-05-29 19:23:06 -04:00
committed by GitHub
parent a5011996fb
commit bdf627ce07
4 changed files with 53 additions and 2 deletions
Generated
+1
View File
@@ -8640,6 +8640,7 @@ dependencies = [
"html5ever",
"indoc",
"markup5ever_rcdom",
"pretty_assertions",
"regex",
]