Skip to content

[Feature Request] "Show hidden lines" functionality for non-rust files #1502

@rococode

Description

@rococode

As far as I can tell, there is no way to have the "show hidden lines" thing when showing a subset of lines without using #rustdoc_include.

However, #rustdoc_include wraps invalid rust (i.e. any file that's actually not supposed to be rust code) automatically with a main function.

For example, something like,

```rust
{{#rustdoc_include hello.txt:1:2}}
\```

will render as:

#![allow(unused)]
fn main() {
hello
}

when "Show hidden lines" is clicked, which interferes with copy-pasting and general cleanliness. It would be great if the "Show hidden lines" / "Hide lines" functionality could be toggled on somehow for regular non-rust files for which only a certain range of lines are shown by default.

#1294 and #1289 seem related, though they appear to still be within the context of rust code files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions