8000 Code block shows N lines of content · Issue #6826 · hedgedoc/hedgedoc · GitHub
[go: up one dir, main page]

Skip to content

Code block shows N lines of content #6826

Open

Description

@rvalue

Is your feature request related to a problem? Please describe.

While working with too much data, a longer code block can take up a large part of the hedgedoc note. To give equal attention to other parts of the note, it might be a good thing to limit the portion of the code block show to N number of lines.

This is not a limitation on the amount of content the code block (code fences) can have, it is just a constraint on the amount of code to show.

Implementor can decide how the rest of the block content is rendered.

Describe the solution you'd like

N/A

Describe alternatives you've considered

N/A

Additional context

No response

Activity

  1. added this to the Version 2.x milestone on Sep 9, 2026
  2. felixhummel commented on Sep 9, 2026

    @felixhummel

    Please make this opt-in. 🙏

  3. DerMolly commented on Sep 9, 2026

    @DerMolly
    Member

    Not sure how exactly this would be implemented, but my first instinct is to put something special in the line of the starting code fence after the language. It will need some kind of identifier and then specify a number. Probably something we should look at in the context of the other flags that are already possible with the code fences.

    Anyway this feature will not be something the admin activates for all users, but something the user specifies on a per-note basis.

  4. mraof commented on Sep 9, 2026

    @mraof

    I think a way to opt in would make the most sense placed in the YAML header with a numerical value. Maybe a second way per block could be useful too, I'm not certain the full use case

  5. ErikMichelson commented on Sep 9, 2026

    @ErikMichelson
    Member

    I think we misunderstand. It's not about limiting the codeblock itself. It's about making the renderer view compact by default with a button to expand it to full height, similar to some chat clients do that in regards of code blocks.
    When we add this feature, there should be an option in the renderer settings to always expand code blocks. There should be no per-document YAML configuration or similar since it is not related to the content itself, but the renderer. The codeblock syntax is bloated enough already, there shouldn't be a new option for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    0