8 Commits (9fc9c1de98aff0329f358753ba5b2635dd522ac3)

Author SHA1 Message Date
mrsdizzie af7ffaa279
Server-side syntax highlighting for all code (#12047)
* Server-side syntax hilighting for all code

This PR does a few things:

* Remove all traces of highlight.js
* Use chroma library to provide fast syntax hilighting directly on the server
* Provide syntax hilighting for diffs
* Re-style both unified and split diffs views
* Add custom syntax hilighting styling for both regular and arc-green

Fixes #7729
Fixes #10157
Fixes #11825
Fixes #7728
Fixes #3872
Fixes #3682

And perhaps gets closer to #9553

* fix line marker

* fix repo search

* Fix single line select

* properly load settings

* npm uninstall highlight.js

* review suggestion

* code review

* forgot to call function

* fix test

* Apply suggestions from code review

suggestions from @silverwind thanks

Co-authored-by: silverwind <me@silverwind.io>

* code review

* copy/paste error

* Use const for highlight size limit

* Update web_src/less/_repository.less

Co-authored-by: Lauris BH <lauris@nix.lv>

* update size limit to 1MB and other styling tweaks

* fix highlighting for certain diff sections

* fix test

* add worker back as suggested

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago
silverwind 1d8915ad5d Add a lot of extension to language mappings for syntax highlights (#7741)
Data partially based on [CodeMirror's meta.js](https://github.com/codemirror/CodeMirror/blob/master/mode/meta.js).

Fixes: https://github.com/go-gitea/gitea/issues/6057
5 years ago
FlorianBen 0e887af2d1 Fix specific highlighting (CMakeLists.txt ...) (#7686)
* Fix specific highlighting.

* Highlighting CMakeLists.txt:
remove case sensitive checks.
use lowercase checks instead.
5 years ago
Rob Watson 8bf405986e Add Rust highlighting (#7125) 5 years ago
Robert A. Nowak 592924a34b Fix Erlang and Elixir highlight mappings (#7044) 5 years ago
Ethan Koenig 6d613fb28e No highlighting for .txt files (#1922) 7 years ago
Andrey Nering be5323a05f Update HighlightJS and fix YAML files highlighting (#1764)
* Update HighlightJS to 9.11.0

* Fix YAML files highlighting
7 years ago
Thomas Boerger 83ed234472 Integrate templates into bindata optionally (#314)
Integrated optional bindata for the templates
8 years ago