Skip to content

Syntax highlight in diff and edit preview broken #7728

@silverwind

Description

@silverwind
Member

The highlighting code currently assumes a pre > code structure to work but this is not given for diff and edit previews. Given that pre > code is problematic in regards to introducing extra whitespace for text selection, I think we should introduce a new exclusive HTML class for syntax highlighting and use that everywhere.

Activity

lafriks

lafriks commented on Aug 3, 2019

@lafriks
Member

How that will work in markdown code sections?

silverwind

silverwind commented on Aug 3, 2019

@silverwind
MemberAuthor

Good point, if the markdown renderer can only output pre > code, we have to cover it via .markdown pre > code. On the other hand, I think some more expermentation is neccessary if pre > code can be made to work in regard to copy/paste.

stale

stale commented on Oct 2, 2019

@stale

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

added
issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implemented
on Oct 3, 2019
added this to the 1.13.0 milestone on Jun 30, 2020
added a commit that references this issue on Jun 30, 2020
af7ffaa
added a commit that references this issue on Jul 31, 2020
845b9f1
locked and limited conversation to collaborators on Nov 24, 2020
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

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/enhancementAn improvement of existing functionality

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      Participants

      @lunny@silverwind@lafriks

      Issue actions

        Syntax highlight in diff and edit preview broken · Issue #7728 · go-gitea/gitea