github / github/markup

Support language and diff highlighting together

Đang mở
#2,025 8 bình luận 5 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Ruby
Star
6k
Fork
3.4k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Support for both language and diff highlighting together is a popular feature request, as can be seen from the discussion https://github.com/github-linguist/linguist/discussions/5758 on the Linguist repo and [this Stack Overflow question](https://stackoverflow.com/questions/40883421/diff-syntax-highlighting-in-github-markdown).

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

```diff
՝՝՝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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.