Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
feat(modules): add a bunch of languages to highlightjs instead of onl…
Browse files Browse the repository at this point in the history
…y having a few
  • Loading branch information
prplwtf committed Nov 14, 2023
1 parent 1f49c3a commit 8b01dab
Show file tree
Hide file tree
Showing 132 changed files with 4,921 additions and 42 deletions.
2,431 changes: 2,403 additions & 28 deletions .modules/highlight.js/highlight.min.js

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions .modules/highlight.js/languages/1c.min.js

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions .modules/highlight.js/languages/abnf.min.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*! `abnf` grammar compiled for Highlight.js 11.9.0 */
(()=>{var e=(()=>{"use strict";return e=>{const a=e.regex,s=e.COMMENT(/;/,/$/)
;return{name:"Augmented Backus-Naur Form",illegal:/[!@#$^&',?+~`|:]/,
keywords:["ALPHA","BIT","CHAR","CR","CRLF","CTL","DIGIT","DQUOTE","HEXDIG","HTAB","LF","LWSP","OCTET","SP","VCHAR","WSP"],
contains:[{scope:"operator",match:/=\/?/},{scope:"attribute",
match:a.concat(/^[a-zA-Z][a-zA-Z0-9-]*/,/(?=\s*=)/)},s,{scope:"symbol",
match:/%b[0-1]+(-[0-1]+|(\.[0-1]+)+)?/},{scope:"symbol",
match:/%d[0-9]+(-[0-9]+|(\.[0-9]+)+)?/},{scope:"symbol",
match:/%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+)?/},{scope:"symbol",
match:/%[si](?=".*")/},e.QUOTE_STRING_MODE,e.NUMBER_MODE]}}})()
;hljs.registerLanguage("abnf",e)})();
13 changes: 13 additions & 0 deletions .modules/highlight.js/languages/accesslog.min.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*! `accesslog` grammar compiled for Highlight.js 11.9.0 */
(()=>{var e=(()=>{"use strict";return e=>{
const n=e.regex,a=["GET","POST","HEAD","PUT","DELETE","CONNECT","OPTIONS","PATCH","TRACE"]
;return{name:"Apache Access Log",contains:[{className:"number",
begin:/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?\b/,relevance:5},{
className:"number",begin:/\b\d+\b/,relevance:0},{className:"string",
begin:n.concat(/"/,n.either(...a)),end:/"/,keywords:a,illegal:/\n/,relevance:5,
contains:[{begin:/HTTP\/[12]\.\d'/,relevance:5}]},{className:"string",
begin:/\[\d[^\]\n]{8,}\]/,illegal:/\n/,relevance:1},{className:"string",
begin:/\[/,end:/\]/,illegal:/\n/,relevance:0},{className:"string",
begin:/"Mozilla\/\d\.\d \(/,end:/"/,illegal:/\n/,relevance:3},{
className:"string",begin:/"/,end:/"/,illegal:/\n/,relevance:0}]}}})()
;hljs.registerLanguage("accesslog",e)})();
25 changes: 25 additions & 0 deletions .modules/highlight.js/languages/ada.min.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*! `ada` grammar compiled for Highlight.js 11.9.0 */
(()=>{var e=(()=>{"use strict";return e=>{
const n="\\d(_|\\d)*",s="[eE][-+]?"+n,a="\\b("+n+"#\\w+(\\.\\w+)?#("+s+")?|"+n+"(\\."+n+")?("+s+")?)",r="[A-Za-z](_?[A-Za-z0-9.])*",i="[]\\{\\}%#'\"",t=e.COMMENT("--","$"),c={
begin:"\\s+:\\s+",end:"\\s*(:=|;|\\)|=>|$)",illegal:i,contains:[{
beginKeywords:"loop for declare others",endsParent:!0},{className:"keyword",
beginKeywords:"not null constant access function procedure in out aliased exception"
},{className:"type",begin:r,endsParent:!0,relevance:0}]};return{name:"Ada",
case_insensitive:!0,keywords:{
keyword:["abort","else","new","return","abs","elsif","not","reverse","abstract","end","accept","entry","select","access","exception","of","separate","aliased","exit","or","some","all","others","subtype","and","for","out","synchronized","array","function","overriding","at","tagged","generic","package","task","begin","goto","pragma","terminate","body","private","then","if","procedure","type","case","in","protected","constant","interface","is","raise","use","declare","range","delay","limited","record","when","delta","loop","rem","while","digits","renames","with","do","mod","requeue","xor"],
literal:["True","False"]},contains:[t,{className:"string",begin:/"/,end:/"/,
contains:[{begin:/""/,relevance:0}]},{className:"string",begin:/'.'/},{
className:"number",begin:a,relevance:0},{className:"symbol",begin:"'"+r},{
className:"title",
begin:"(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?",
end:"(is|$)",keywords:"package body",excludeBegin:!0,excludeEnd:!0,illegal:i},{
begin:"(\\b(with|overriding)\\s+)?\\b(function|procedure)\\s+",
end:"(\\bis|\\bwith|\\brenames|\\)\\s*;)",
keywords:"overriding function procedure with is renames return",returnBegin:!0,
contains:[t,{className:"title",
begin:"(\\bwith\\s+)?\\b(function|procedure)\\s+",end:"(\\(|\\s+|$)",
excludeBegin:!0,excludeEnd:!0,illegal:i},c,{className:"type",
begin:"\\breturn\\s+",end:"(\\s+|;|$)",keywords:"return",excludeBegin:!0,
excludeEnd:!0,endsParent:!0,illegal:i}]},{className:"type",
begin:"\\b(sub)?type\\s+",end:"\\s+",keywords:"type",excludeBegin:!0,illegal:i
},c]}}})();hljs.registerLanguage("ada",e)})();
14 changes: 14 additions & 0 deletions .modules/highlight.js/languages/apache.min.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*! `apache` grammar compiled for Highlight.js 11.9.0 */
(()=>{var e=(()=>{"use strict";return e=>{const n={className:"number",
begin:/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?/};return{
name:"Apache config",aliases:["apacheconf"],case_insensitive:!0,
contains:[e.HASH_COMMENT_MODE,{className:"section",begin:/<\/?/,end:/>/,
contains:[n,{className:"number",begin:/:\d{1,5}/
},e.inherit(e.QUOTE_STRING_MODE,{relevance:0})]},{className:"attribute",
begin:/\w+/,relevance:0,keywords:{
_:["order","deny","allow","setenv","rewriterule","rewriteengine","rewritecond","documentroot","sethandler","errordocument","loadmodule","options","header","listen","serverroot","servername"]
},starts:{end:/$/,relevance:0,keywords:{literal:"on off all deny allow"},
contains:[{className:"meta",begin:/\s\[/,end:/\]$/},{className:"variable",
begin:/[\$%]\{/,end:/\}/,contains:["self",{className:"number",begin:/[$%]\d+/}]
},n,{className:"number",begin:/\b\d+/},e.QUOTE_STRING_MODE]}}],illegal:/\S/}}
})();hljs.registerLanguage("apache",e)})();
54 changes: 54 additions & 0 deletions .modules/highlight.js/languages/arduino.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions .modules/highlight.js/languages/armasm.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8b01dab

Please sign in to comment.