Skip to content

Add format indent for generated code link with rust-playground #120998

Closed
@chenyukang

Description

@chenyukang

This idea is from #119161

When clicking the Run button, will jump to the rust-playground, the code is not indent well:

image

the link is generated from code:

doctest::make_test(&test, krate, false, &Default::default(), edition, None);

I would be nice if we add extra indent space for the code block after inserting fn main { for the code in document.

I checked rust-playgrund, seems there is no a URL argument like format=true for the code link.

Metadata

Metadata

Assignees

Labels

A-rustdoc-uiArea: Rustdoc UI (generated HTML)C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions