/*! `powershell` grammar compiled for Highlight.js 11.11.1 */
(function () {
var hljsGrammar = (function () {
'use strict';
/*
Language: PowerShell
Author: David Mohl <david@dmohl.com>
Contributor: Nicholas Blumhardt <nblumhardt@nblumhardt.com>, Jason Moseley <jmoseley@jmoseley.com>
Website: https://docs.microsoft.com/en-us/powershell/
Category: common
*/
/** @type LanguageFn */
function powershell(hljs) {
const VARIABLE = {
className: 'term-variable',
variants: [
{ begin: /\$[\w\d][\w\d_:]*/ }
]
};
const QUOTE_STRING = {
className: 'term-string',
begin: /"/, end: /"/,
contains: [
hljs.BACKSLASH_ESCAPE,
VARIABLE
]
};
const APOS_STRING = {
className: 'term-string',
begin: /'/, end: /'/
};
return {
name: 'PowerShell',
aliases: ['ps', 'ps1'],
case_insensitive: true,
contains: [
hljs.COMMENT(/#/, /$/),
QUOTE_STRING,
APOS_STRING,
// Command at start of line
{
className: 'term-command',
begin: /^\s*[\w\d_-]+/,
},
// Options starting with -
{
className: 'term-option',
begin: /\s-[\w\d_-]+/,
},
VARIABLE,
{
className: 'term-number',
begin: /\b\d+\b/
}
]
};
}
return powershell;
})();
hljs.registerLanguage('powershell', hljsGrammar);
})();
/*! `powershell` grammar compiled for Highlight.js 11.11.1 */
(function () {
var hljsGrammar = (function () {
'use strict';
/*
Language: PowerShell
Author: David Mohl <david@dmohl.com>
Contributor: Nicholas Blumhardt <nblumhardt@nblumhardt.com>, Jason Moseley <jmoseley@jmoseley.com>
Website: https://docs.microsoft.com/en-us/powershell/
Category: common
*/
/** @type LanguageFn */
function powershell(hljs) {
const VARIABLE = {
className: 'term-variable',
variants: [
{ begin: /\$[\w\d][\w\d_:]*/ }
]
};
const QUOTE_STRING = {
className: 'term-string',
begin: /"/, end: /"/,
contains: [
hljs.BACKSLASH_ESCAPE,
VARIABLE
]
};
const APOS_STRING = {
className: 'term-string',
begin: /'/, end: /'/
};
return {
name: 'PowerShell',
aliases: ['ps', 'ps1'],
case_insensitive: true,
contains: [
hljs.COMMENT(/#/, /$/),
QUOTE_STRING,
APOS_STRING,
// Command at start of line
{
className: 'term-command',
begin: /^\s*[\w\d_-]+/,
},
// Options starting with -
{
className: 'term-option',
begin: /\s-[\w\d_-]+/,
},
VARIABLE,
{
className: 'term-number',
begin: /\b\d+\b/
}
]
};
}
return powershell;
})();
hljs.registerLanguage('powershell', hljsGrammar);
})();