Skip to content

Highlight hidden lines in Rust code in documentation comments #244

Open
@jonhoo

Description

@jonhoo

Consider the following Rust code:

//! ```
//! # use std::sync::Arc;
//! let x = Arc::new(0);
//! ```

The code inside the code block is correctly highlighted, but the # character stands out by not being highlighted. Could it perhaps be highlighted as a doc comment too?

I think ideally lines leading with # in a doctest should be highlighted differently (perhaps with a different background or dim colors?), but that's probably much harder.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions