-
Notifications
You must be signed in to change notification settings - Fork 582
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use highlight.js instead of prettify for syntax coloring
Originally based from work by @dotandimet. Additional changes: * highlight.js: Update to latest (10.3.1) Install custom build limiting highlights for diff, plaintext, makefile, bash, html/xml, sql, css, and perl only, to reduce from the normal common pack size (100k to just 40k.) This also adds the Mojolicious language plugin for highlight.js. * debug.html.ep: Simplifiy highlight.js loading Follow https://highlightjs.org/usage for this case, it seems more reliable to let it highlight as well as determine the language to be highlighted on its own. * highlight-mojo-dark.css: Remake based on newer upstream dark theme * Drop highligh-mojo-light.css No longer needed here. * Mojolicious.pm: Add license section for highlight.js * Remove prettify.js highlight.js now replaces it. Thanks for the service, prettify.js!
- Loading branch information
Showing
8 changed files
with
472 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
lib/Mojolicious/resources/public/mojo/highlight.js/highlight-mojo-dark.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
.hljs { | ||
display: block; | ||
overflow-x: auto; | ||
} | ||
|
||
.hljs-keyword, | ||
.hljs-selector-tag, | ||
.hljs-literal, | ||
.hljs-section, | ||
.hljs-link { | ||
color:#fcf0a4; | ||
} | ||
|
||
.hljs, | ||
.hljs-subst { | ||
color:#889dbc; | ||
} | ||
|
||
.hljs-string, | ||
.hljs-title, | ||
.hljs-name, | ||
.hljs-type, | ||
.hljs-attribute, | ||
.hljs-symbol, | ||
.hljs-bullet, | ||
.hljs-built_in, | ||
.hljs-addition, | ||
.hljs-variable, | ||
.hljs-template-tag, | ||
.hljs-template-variable { | ||
color: #9daa7e; | ||
} | ||
|
||
.hljs-comment, | ||
.hljs-quote, | ||
.hljs-deletion, | ||
.hljs-meta { | ||
color:#726d73; | ||
} | ||
|
||
.hljs-keyword, | ||
.hljs-selector-tag, | ||
.hljs-literal, | ||
.hljs-title, | ||
.hljs-section, | ||
.hljs-doctag, | ||
.hljs-type, | ||
.hljs-name, | ||
.hljs-strong { | ||
font-weight: bold; | ||
color:#d5b57c; | ||
} | ||
|
||
.hljs-emphasis { | ||
font-style: italic; | ||
} |
402 changes: 402 additions & 0 deletions
402
lib/Mojolicious/resources/public/mojo/highlight.js/highlight.min.js
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
lib/Mojolicious/resources/public/mojo/highlight.js/mojolicious.min.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
lib/Mojolicious/resources/public/mojo/prettify/prettify-mojo-dark.css
This file was deleted.
Oops, something went wrong.
63 changes: 0 additions & 63 deletions
63
lib/Mojolicious/resources/public/mojo/prettify/run_prettify.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters