Skip to content

Strikethrough not visible next to items in Rustdoc module summary #85822

Closed
@Tamschi

Description

@Tamschi

There seems to be a formatting inconsistency between item pages and what's rendered next to the item's identifier on the module pages.


I tried this code:

/// ~~Test~~
pub fn test() {}

I expected to see this happen:
"Test" should also be rendered with strikethrough when viewed on the module page of the documentation, next to the item name.

Instead, this happened:
The text isn't strikethrough there, but is rendered strikethrough on the page of the item itself. Essentially, the surrounding <del> element is missing on the module page.

Meta

rustdoc --version --verbose:

rustdoc 1.52.1 (9bc8c42bb 2021-05-09)
binary: rustdoc
commit-hash: 9bc8c42bb2f19e745a63f3445f1ac248fb015e53
commit-date: 2021-05-09
host: x86_64-pc-windows-msvc
release: 1.52.1
LLVM version: 12.0.0
rustdoc 1.54.0-nightly (ca82264ec 2021-05-09)
binary: rustdoc
commit-hash: ca82264ec7556a6011b9d3f1b2fd4c7cd0bc8ae2
commit-date: 2021-05-09
host: x86_64-pc-windows-msvc
release: 1.54.0-nightly
LLVM version: 12.0.1

I'm using meaningful strikethrough formatting here (with non-strikethrough meaning the opposite), so it would be nice to see this fixed.

As an aside, the recommended element for rendering general (non-deletion) strikethrough text seems to be <s>, not <del>.
Maybe I should use a different method entirely though, as screen reader announcement is apparently not a given for either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-uiArea: Rustdoc UI (generated HTML)C-bugCategory: This is a bug.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