Initial commit.

Signed-off-by: Andreas Widen <aw@luflow.net>
This commit is contained in:
Andreas Widen 2026-07-27 17:57:03 +02:00
commit a4a5c7daa5
Signed by: hfsoulz
GPG key ID: 5B85F9B5F576A667
1389 changed files with 241399 additions and 0 deletions

View file

@ -0,0 +1,78 @@
/*! `properties` grammar compiled for Highlight.js 11.11.1 */
(function(){
var hljsGrammar = (function () {
'use strict';
/*
Language: .properties
Contributors: Valentin Aitken <valentin@nalisbg.com>, Egor Rogov <e.rogov@postgrespro.ru>
Website: https://en.wikipedia.org/wiki/.properties
Category: config
*/
/** @type LanguageFn */
function properties(hljs) {
// whitespaces: space, tab, formfeed
const WS0 = '[ \\t\\f]*';
const WS1 = '[ \\t\\f]+';
// delimiter
const EQUAL_DELIM = WS0 + '[:=]' + WS0;
const WS_DELIM = WS1;
const DELIM = '(' + EQUAL_DELIM + '|' + WS_DELIM + ')';
const KEY = '([^\\\\:= \\t\\f\\n]|\\\\.)+';
const DELIM_AND_VALUE = {
// skip DELIM
end: DELIM,
relevance: 0,
starts: {
// value: everything until end of line (again, taking into account backslashes)
className: 'string',
end: /$/,
relevance: 0,
contains: [
{ begin: '\\\\\\\\' },
{ begin: '\\\\\\n' }
]
}
};
return {
name: '.properties',
disableAutodetect: true,
case_insensitive: true,
illegal: /\S/,
contains: [
hljs.COMMENT('^\\s*[!#]', '$'),
// key: everything until whitespace or = or : (taking into account backslashes)
// case of a key-value pair
{
returnBegin: true,
variants: [
{ begin: KEY + EQUAL_DELIM },
{ begin: KEY + WS_DELIM }
],
contains: [
{
className: 'attr',
begin: KEY,
endsParent: true
}
],
starts: DELIM_AND_VALUE
},
// case of an empty key
{
className: 'attr',
begin: KEY + WS0 + '$'
}
]
};
}
return properties;
})();
hljs.registerLanguage('properties', hljsGrammar);
})();