Skip to content

Support language and diff highlighting together #2025

@hb20007

Description

@hb20007

Support for both language and diff highlighting together is a popular feature request, as can be seen from the discussion github-linguist/linguist#5758 on the Linguist repo and this Stack Overflow question.

This feature has already been implemented on other markdown-powered sites. The most straightforward syntax would be:

՝՝՝diff js
 let fileIcon = document.querySelector("li.file-entry > span.icon");
+fileIcon.classList.remove("icon-file-text");
 const disposable = addIconToElement(fileIcon, "/path/to/file.txt");
՝՝՝

Currently, this ignores the “js” part and only applies the “diff” syntax highlighting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions