aesop
-needs: import Aesop
aesop
は,intro
や simp
を使用してルーチンな証明を自動で行おうとします.
-- 合成 `g ∘ f` が単射なら,`f` も単射
+aesop
は,intro
や simp
を使用してルーチンな証明を自動で行う,強力なタクティクです. aesop?
を使うことにより,中身を見ることも可能です.
+import Aesop -- `aesop` を使用するため
+import Mathlib.Init.Function -- `Injective` を使用するため
+import Mathlib.Tactic.Says -- `says` を使用するため
+
+-- CI 環境で `says` のチェックをしない
+set_option says.no_verify_in_CI true
+
+-- 以下 `X` `Y` `Z`を集合とする
+variable {X Y Z : Type}
+
+open Function
+
+/-! ## aesop -/
+
+-- 合成 `g ∘ f` が単射なら,`f` も単射
example {f : X → Y} {g : Y → Z} (hgfinj : Injective (g ∘ f)) : Injective f := by
rw [Injective]
+ show ∀ ⦃a₁ a₂ : X⦄, f a₁ = f a₂ → a₁ = a₂
+
+ -- 示すべきことがまだまだあるように見えるが,一発で証明が終わる
aesop
-
-aesop?
-aesop
が成功したとき,aesop?
に置き換えると,ゴールを達成するのにどんなタクティクを使用したか教えてくれます.
-example {f : X → Y} {g : Y → Z} (hgfinj : Injective (g ∘ f)) : Injective f := by
+
+/-!
+ ## aesop?
+ aesop が成功するとき,aesop? に置き換えると,
+ ゴールを達成するのにどんなタクティクを使用したか教えてくれる.
+-/
+
+example {f : X → Y} {g : Y → Z} (hgfinj : Injective (g ∘ f)) : Injective f := by
rw [Injective]
- -- `aesop?` は以下を返す
- intro a₁ a₂ a
- apply hgfinj
- simp_all only [comp_apply]
+ -- `aesop?` は `says` 以下に続く一連のタクティクを示す
+ aesop? says
+ intro a₁ a₂ a
+ apply hgfinj
+ simp_all only [comp_apply]
-
+
@@ -234,7 +234,7 @@
-
+
diff --git a/apply_assumption.html b/apply_assumption.html
index 652f734e..8e110ccf 100644
--- a/apply_assumption.html
+++ b/apply_assumption.html
@@ -88,7 +88,7 @@
@@ -177,7 +177,13 @@ Lean4 タクティク逆引きリスト
apply_assumption
Lean4 タクティク逆引きリスト
apply_assumption
needs: import Mathlib.Tactic.SolveByElim
apply_assumption
は,ゴールが ⊢ head
であるときに,... → ∀ _, ... → head
という形の命題をローカルコンテキストから探し,それを用いてゴールを書き換えます.
example (hPQ : P → Q) : ¬ Q → ¬ P := by
+import Mathlib.Tactic.SolveByElim
+
+variable (P Q R : Prop)
+
+/-! ## apply_assumption -/
+
+example (hPQ : P → Q) : ¬ Q → ¬ P := by
intro hQn hP
-- 矛盾を示したい
@@ -193,10 +199,19 @@ apply_assum
-- 自動で `hP` を適用
apply_assumption
+
+ -- 証明終わり
done
-
-タクティクを繰り返すことを指示するタクティク repeat
と組み合わせると,「ローカルコンテキストにある仮定を適切に選んで apply
, exact
することを繰り返し,ゴールを閉じる」ことができます.
-example (hPQ : P → Q) (hQR : Q → R) (hQ : P) : R := by
+
+/-!
+ ## repeat apply_assumption
+
+ タクティクを繰り返すことを指示するタクティク `repeat` と組み合わせると,
+ 「ローカルコンテキストにある仮定を適切に選んで apply, exact することを繰り返し,
+ ゴールを閉じる」ことができます.
+-/
+
+example (hPQ : P → Q) (hQR : Q → R) (hQ : P) : R := by
repeat apply_assumption
diff --git a/apply_question.html b/apply_search.html
similarity index 66%
rename from apply_question.html
rename to apply_search.html
index c5710711..6fa249b1 100644
--- a/apply_question.html
+++ b/apply_search.html
@@ -3,7 +3,7 @@
- apply?: ライブラリ検索で後方推論 - Lean4 タクティク逆引きリスト
+ apply?: apply できるか検索 - Lean4 タクティク逆引きリスト
@@ -88,7 +88,7 @@
@@ -175,36 +175,37 @@ Lean4 タクティク逆引きリスト
apply?
-needs: import Mathlib.Tactic.LibrarySearch
-apply?
は,ゴールを閉じるのに必要な命題をライブラリから検索してきて,提案してくれるタクティクです.
--- 群準同型は積を保つ
+apply?
は,カレントゴールを apply
や refine で変形することができないか,ライブラリから検索して提案してくれるタクティクです.
+複数の候補が提案されたときは,どれを選ぶとゴールが何に変わるのか表示されるので,その中から好ましいものを選ぶと良いでしょう.
+import Mathlib.Algebra.Group.Defs
+import Mathlib.Algebra.Hom.Group.Defs
+import Mathlib.Tactic.LibrarySearch -- apply? を使うのに必要
+
+/-- 群準同型は積を保つ -/
example [Group G] [Group H] (f : G →* H) (a b : G) :
f (a * b) = f a * f b := by
- -- `exact MonoidHom.map_mul f a b` を提案してくれる
- apply?
-
-複数の候補が提案されたときは,どれを選ぶとゴールが何に変わるのか表示されるので,その中から好ましいものを選ぶと良いでしょう.
-補足
-apply?
はあくまで証明を書くときに補助として使うものです.sorry
と同じように,清書した証明に残してはいけません.
-sorry
と同じと言いましたが,実際 apply?
は sorryAx 1 を裏で使用します.これは,#explode
で証明の中身を出力させれば分かります.sorry
を使っているという旨の警告も出ます.
-theorem T (x y : Nat) (_: x ≤ y) : 2 ^ x ≤ 2 ^ y := by
- apply?
-
- -- `apply?` しただけで `done` が通り,示せているように見える
- done
-
-/-
-T : ∀ (x y : ℕ), x ≤ y → 2 ^ x ≤ 2 ^ y
-
-0│ │ x ├ ℕ
-1│ │ y ├ ℕ
-2│ │ h ├ x ≤ y
-3│ │ sorryAx │ 2 ^ x ≤ 2 ^ y
-4│0,1,2,3│ ∀I │ ∀ (x y : ℕ), x ≤ y → 2 ^ x ≤ 2 ^ y
+ -- `exact MonoidHom.map_mul f a b` を提案してくれる
+ apply?
+
+/-!
+ ## 補足
+
+ `apply?` はあくまで証明を書くときに補助として使うものです.
+ `sorry` と同じように,清書した証明に残してはいけません.
+ `sorry` と同じと言いましたが,実際 `apply?` は `sorryAx` を裏で使用します.
-/
-#explode T
+
+theorem T (x y : Nat) (_: x ≤ y) : 2 ^ x ≤ 2 ^ y := by
+ apply?
+
+ -- `apply?` しただけで `done` が通り,示せているように見える
+ done
+
+-- 以下に示すように,裏で `sorryAx` が使われている
+
+/-- info: 'T' depends on axioms: [sorryAx] -/
+#guard_msgs in #print axioms T
-1 sorry
が裏で使用している公理のこと
diff --git a/assumption.html b/assumption.html
index c4530bf7..458fee0b 100644
--- a/assumption.html
+++ b/assumption.html
@@ -88,7 +88,7 @@
@@ -186,7 +186,7 @@ exact
diff --git a/exact_question.html b/exact_search.html
similarity index 70%
rename from exact_question.html
rename to exact_search.html
index da453c3f..85b3145f 100644
--- a/exact_question.html
+++ b/exact_search.html
@@ -3,7 +3,7 @@
- exact?: ゴールをライブラリ検索 - Lean4 タクティク逆引きリスト
+ exact?: exact できるか検索 - Lean4 タクティク逆引きリスト
@@ -88,7 +88,7 @@
@@ -175,15 +175,17 @@
Lean4 タクティク逆引きリスト
exact?
-needs: import Mathlib.Tactic.LibrarySearch
-exact?
は,ライブラリとローカルコンテキストにある命題を使って,ゴールを閉じることができないか探索します.
--- `exact?` はライブラリ検索を行う
+exact?
は,カレントゴールを exact
で閉じることができないか,ライブラリから検索して提案してくれるタクティクです.閉じることができなければ,エラーになります.
+import Mathlib.Tactic.LibrarySearch -- `exact?` を使うのに必要
+
+variable (P Q : Prop)
+
+-- `exact?` はライブラリ検索を行う
example : x < x + 1 := by
-- `Try this: exact Nat.lt.base x` と出力される
exact?
-
-apply? と似ていますが,apply?
とは異なりゴールを変形するのではなくて exact
で直接閉じようとします.
--- ローカルコンテキストにある仮定を自動で使ってゴールを導いてくれる
+
+-- ローカルコンテキストにある仮定を自動で使ってゴールを導いてくれる
example (hPQ : P → Q) (hQR : Q → R) (hQ : P) : R := by
-- `Try this: exact hQR (hPQ hQ)` と出力される
exact?
diff --git a/exists.html b/exists.html
index 99f683fd..378b7bce 100644
--- a/exists.html
+++ b/exists.html
@@ -88,7 +88,7 @@
@@ -185,7 +185,7 @@
exists
-
+
@@ -199,7 +199,7 @@ exists
-
+
diff --git a/ext.html b/ext.html
index 240caff6..3158ed00 100644
--- a/ext.html
+++ b/ext.html
@@ -88,7 +88,7 @@
diff --git a/funext.html b/funext.html
index cdbd4f37..293df233 100644
--- a/funext.html
+++ b/funext.html
@@ -88,7 +88,7 @@
diff --git a/guard_hyp.html b/guard_hyp.html
index 3064c766..1c84ef92 100644
--- a/guard_hyp.html
+++ b/guard_hyp.html
@@ -88,7 +88,7 @@
diff --git a/have.html b/have.html
index cda2245d..ddea8310 100644
--- a/have.html
+++ b/have.html
@@ -88,7 +88,7 @@
diff --git a/highlight.js b/highlight.js
index 0f6d3e40..1d08a729 100644
--- a/highlight.js
+++ b/highlight.js
@@ -4,1206 +4,1206 @@
Copyright (c) 2006-2020, Ivan Sagalaev
*/
var hljs=function(){"use strict";function e(n){Object.freeze(n)
- ;var t="function"==typeof n
- ;return Object.getOwnPropertyNames(n).forEach((function(r){
- !Object.hasOwnProperty.call(n,r)||null===n[r]||"object"!=typeof n[r]&&"function"!=typeof n[r]||t&&("caller"===r||"callee"===r||"arguments"===r)||Object.isFrozen(n[r])||e(n[r])
- })),n}class n{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}
- ignoreMatch(){this.ignore=!0}}function t(e){
- return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")
- }function r(e,...n){var t={};for(const n in e)t[n]=e[n]
- ;return n.forEach((function(e){for(const n in e)t[n]=e[n]})),t}function a(e){
- return e.nodeName.toLowerCase()}var i=Object.freeze({__proto__:null,
- escapeHTML:t,inherit:r,nodeStream:function(e){var n=[];return function e(t,r){
- for(var i=t.firstChild;i;i=i.nextSibling)3===i.nodeType?r+=i.nodeValue.length:1===i.nodeType&&(n.push({
- event:"start",offset:r,node:i}),r=e(i,r),a(i).match(/br|hr|img|input/)||n.push({
- event:"stop",offset:r,node:i}));return r}(e,0),n},mergeStreams:function(e,n,r){
- var i=0,s="",o=[];function l(){
- return e.length&&n.length?e[0].offset!==n[0].offset?e[0].offset
"}function u(e){
- s+=""+a(e)+">"}function g(e){("start"===e.event?c:u)(e.node)}
- for(;e.length||n.length;){var d=l()
- ;if(s+=t(r.substring(i,d[0].offset)),i=d[0].offset,d===e){o.reverse().forEach(u)
- ;do{g(d.splice(0,1)[0]),d=l()}while(d===e&&d.length&&d[0].offset===i)
- ;o.reverse().forEach(c)
- }else"start"===d[0].event?o.push(d[0].node):o.pop(),g(d.splice(0,1)[0])}
- return s+t(r.substr(i))}});const s=e=>!!e.kind;class o{constructor(e,n){
- this.buffer="",this.classPrefix=n.classPrefix,e.walk(this)}addText(e){
- this.buffer+=t(e)}openNode(e){if(!s(e))return;let n=e.kind
- ;e.sublanguage||(n=`${this.classPrefix}${n}`),this.span(n)}closeNode(e){
- s(e)&&(this.buffer+="")}value(){return this.buffer}span(e){
- this.buffer+=``}}class l{constructor(){this.rootNode={
- children:[]},this.stack=[this.rootNode]}get top(){
- return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){
- this.top.children.push(e)}openNode(e){const n={kind:e,children:[]}
- ;this.add(n),this.stack.push(n)}closeNode(){
- if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){
- for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}
- walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,n){
- return"string"==typeof n?e.addText(n):n.children&&(e.openNode(n),
- n.children.forEach((n=>this._walk(e,n))),e.closeNode(n)),e}static _collapse(e){
- "string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{
- l._collapse(e)})))}}class c extends l{constructor(e){super(),this.options=e}
- addKeyword(e,n){""!==e&&(this.openNode(n),this.addText(e),this.closeNode())}
- addText(e){""!==e&&this.add(e)}addSublanguage(e,n){const t=e.root
- ;t.kind=n,t.sublanguage=!0,this.add(t)}toHTML(){
- return new o(this,this.options).value()}finalize(){return!0}}function u(e){
- return e?"string"==typeof e?e:e.source:null}
- const g="[a-zA-Z]\\w*",d="[a-zA-Z_]\\w*",h="\\b\\d+(\\.\\d+)?",f="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",p="\\b(0b[01]+)",m={
- begin:"\\\\[\\s\\S]",relevance:0},b={className:"string",begin:"'",end:"'",
- illegal:"\\n",contains:[m]},v={className:"string",begin:'"',end:'"',
- illegal:"\\n",contains:[m]},x={
- begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
- },E=function(e,n,t={}){var a=r({className:"comment",begin:e,end:n,contains:[]
- },t);return a.contains.push(x),a.contains.push({className:"doctag",
- begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),a
- },_=E("//","$"),w=E("/\\*","\\*/"),N=E("#","$");var y=Object.freeze({
- __proto__:null,IDENT_RE:g,UNDERSCORE_IDENT_RE:d,NUMBER_RE:h,C_NUMBER_RE:f,
- BINARY_NUMBER_RE:p,
- RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",
- SHEBANG:(e={})=>{const n=/^#![ ]*\//;return e.binary&&(e.begin=function(...e){
- return e.map((e=>u(e))).join("")}(n,/.*\b/,e.binary,/\b.*/)),r({
- className:"meta",begin:n,end:/$/,relevance:0,"on:begin":(e,n)=>{
- 0!==e.index&&n.ignoreMatch()}},e)},BACKSLASH_ESCAPE:m,APOS_STRING_MODE:b,
- QUOTE_STRING_MODE:v,PHRASAL_WORDS_MODE:x,COMMENT:E,C_LINE_COMMENT_MODE:_,
- C_BLOCK_COMMENT_MODE:w,HASH_COMMENT_MODE:N,NUMBER_MODE:{className:"number",
- begin:h,relevance:0},C_NUMBER_MODE:{className:"number",begin:f,relevance:0},
- BINARY_NUMBER_MODE:{className:"number",begin:p,relevance:0},CSS_NUMBER_MODE:{
- className:"number",
- begin:h+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",
- relevance:0},REGEXP_MODE:{begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",
- begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[m,{begin:/\[/,end:/\]/,
- relevance:0,contains:[m]}]}]},TITLE_MODE:{className:"title",begin:g,relevance:0
- },UNDERSCORE_TITLE_MODE:{className:"title",begin:d,relevance:0},METHOD_GUARD:{
- begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0},END_SAME_AS_BEGIN:function(e){
- return Object.assign(e,{"on:begin":(e,n)=>{n.data._beginMatch=e[1]},
- "on:end":(e,n)=>{n.data._beginMatch!==e[1]&&n.ignoreMatch()}})}
- }),R="of and for in not or if then".split(" ");function k(e){function n(n,t){
- return RegExp(u(n),"m"+(e.case_insensitive?"i":"")+(t?"g":""))}class t{
- constructor(){
- this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}
- addRule(e,n){
- n.position=this.position++,this.matchIndexes[this.matchAt]=n,this.regexes.push([n,e]),
- this.matchAt+=function(e){return RegExp(e.toString()+"|").exec("").length-1
- }(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null)
- ;const e=this.regexes.map((e=>e[1]));this.matcherRe=n(function(e,n="|"){
- for(var t=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,r=0,a="",i=0;i0&&(a+=n),a+="(";o.length>0;){var l=t.exec(o)
- ;if(null==l){a+=o;break}
- a+=o.substring(0,l.index),o=o.substring(l.index+l[0].length),
- "\\"===l[0][0]&&l[1]?a+="\\"+(Number(l[1])+s):(a+=l[0],"("===l[0]&&r++)}a+=")"}
- return a}(e),!0),this.lastIndex=0}exec(e){
- this.matcherRe.lastIndex=this.lastIndex;const n=this.matcherRe.exec(e)
- ;if(!n)return null
- ;const t=n.findIndex(((e,n)=>n>0&&void 0!==e)),r=this.matchIndexes[t]
- ;return n.splice(0,t),Object.assign(n,r)}}class a{constructor(){
- this.rules=[],this.multiRegexes=[],
- this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){
- if(this.multiRegexes[e])return this.multiRegexes[e];const n=new t
- ;return this.rules.slice(e).forEach((([e,t])=>n.addRule(e,t))),
- n.compile(),this.multiRegexes[e]=n,n}resumingScanAtSamePosition(){
- return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,n){
- this.rules.push([e,n]),"begin"===n.type&&this.count++}exec(e){
- const n=this.getMatcher(this.regexIndex);n.lastIndex=this.lastIndex
- ;let t=n.exec(e)
- ;if(this.resumingScanAtSamePosition())if(t&&t.index===this.lastIndex);else{
- const n=this.getMatcher(0);n.lastIndex=this.lastIndex+1,t=n.exec(e)}
- return t&&(this.regexIndex+=t.position+1,
- this.regexIndex===this.count&&this.considerAll()),t}}function i(e,n){
- const t=e.input[e.index-1],r=e.input[e.index+e[0].length]
- ;"."!==t&&"."!==r||n.ignoreMatch()}
- if(e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.")
- ;return function t(s,o){const l=s;if(s.compiled)return l
- ;s.compiled=!0,s.__beforeBegin=null,s.keywords=s.keywords||s.beginKeywords
- ;let c=null
- ;if("object"==typeof s.keywords&&(c=s.keywords.$pattern,delete s.keywords.$pattern),
- s.keywords&&(s.keywords=function(e,n){var t={}
- ;return"string"==typeof e?r("keyword",e):Object.keys(e).forEach((function(n){
- r(n,e[n])})),t;function r(e,r){
- n&&(r=r.toLowerCase()),r.split(" ").forEach((function(n){var r=n.split("|")
- ;t[r[0]]=[e,O(r[0],r[1])]}))}
- }(s.keywords,e.case_insensitive)),s.lexemes&&c)throw Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ")
- ;return l.keywordPatternRe=n(s.lexemes||c||/\w+/,!0),
- o&&(s.beginKeywords&&(s.begin="\\b("+s.beginKeywords.split(" ").join("|")+")(?=\\b|\\s)",
- s.__beforeBegin=i),
- s.begin||(s.begin=/\B|\b/),l.beginRe=n(s.begin),s.endSameAsBegin&&(s.end=s.begin),
- s.end||s.endsWithParent||(s.end=/\B|\b/),
- s.end&&(l.endRe=n(s.end)),l.terminator_end=u(s.end)||"",
- s.endsWithParent&&o.terminator_end&&(l.terminator_end+=(s.end?"|":"")+o.terminator_end)),
- s.illegal&&(l.illegalRe=n(s.illegal)),
- void 0===s.relevance&&(s.relevance=1),s.contains||(s.contains=[]),
- s.contains=[].concat(...s.contains.map((function(e){return function(e){
- return e.variants&&!e.cached_variants&&(e.cached_variants=e.variants.map((function(n){
- return r(e,{variants:null},n)}))),e.cached_variants?e.cached_variants:M(e)?r(e,{
- starts:e.starts?r(e.starts):null}):Object.isFrozen(e)?r(e):e}("self"===e?s:e)
- }))),s.contains.forEach((function(e){t(e,l)
- })),s.starts&&t(s.starts,o),l.matcher=function(e){const n=new a
- ;return e.contains.forEach((e=>n.addRule(e.begin,{rule:e,type:"begin"
- }))),e.terminator_end&&n.addRule(e.terminator_end,{type:"end"
- }),e.illegal&&n.addRule(e.illegal,{type:"illegal"}),n}(l),l}(e)}function M(e){
- return!!e&&(e.endsWithParent||M(e.starts))}function O(e,n){
- return n?Number(n):function(e){return R.includes(e.toLowerCase())}(e)?0:1}
- const L={props:["language","code","autodetect"],data:function(){return{
- detectedLanguage:"",unknownLanguage:!1}},computed:{className(){
- return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){
- if(!this.autoDetect&&!hljs.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`),
- this.unknownLanguage=!0,t(this.code);let e
- ;return this.autoDetect?(e=hljs.highlightAuto(this.code),
- this.detectedLanguage=e.language):(e=hljs.highlight(this.language,this.code,this.ignoreIllegals),
- this.detectectLanguage=this.language),e.value},autoDetect(){
- return!(this.language&&(e=this.autodetect,!e&&""!==e));var e},
- ignoreIllegals:()=>!0},render(e){return e("pre",{},[e("code",{
- class:this.className,domProps:{innerHTML:this.highlighted}})])}},j={install(e){
- e.component("highlightjs",L)}
- },I=t,T=r,{nodeStream:S,mergeStreams:A}=i,B=Symbol("nomatch")
- ;return function(t){
- var r=[],a=Object.create(null),i=Object.create(null),s=[],o=!0,l=/(^(<[^>]+>|\t|)+|\n)/gm,u="Could not find the language '{}', did you forget to load/include a language module?"
- ;const g={disableAutodetect:!0,name:"Plain text",contains:[]};var d={
- noHighlightRe:/^(no-?highlight)$/i,
- languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",
- tabReplace:null,useBR:!1,languages:null,__emitter:c};function h(e){
- return d.noHighlightRe.test(e)}function f(e,n,t,r){var a={code:n,language:e}
- ;N("before:highlight",a);var i=a.result?a.result:p(a.language,a.code,t,r)
- ;return i.code=a.code,N("after:highlight",i),i}function p(e,t,r,i){var s=t
- ;function l(e,n){var t=_.case_insensitive?n[0].toLowerCase():n[0]
- ;return Object.prototype.hasOwnProperty.call(e.keywords,t)&&e.keywords[t]}
- function c(){null!=y.subLanguage?function(){if(""!==O){var e=null
- ;if("string"==typeof y.subLanguage){
- if(!a[y.subLanguage])return void M.addText(O)
- ;e=p(y.subLanguage,O,!0,R[y.subLanguage]),R[y.subLanguage]=e.top
- }else e=m(O,y.subLanguage.length?y.subLanguage:null)
- ;y.relevance>0&&(L+=e.relevance),M.addSublanguage(e.emitter,e.language)}
- }():function(){if(!y.keywords)return void M.addText(O);let e=0
- ;y.keywordPatternRe.lastIndex=0;let n=y.keywordPatternRe.exec(O),t="";for(;n;){
- t+=O.substring(e,n.index);const r=l(y,n);if(r){const[e,a]=r
- ;M.addText(t),t="",L+=a,M.addKeyword(n[0],e)}else t+=n[0]
- ;e=y.keywordPatternRe.lastIndex,n=y.keywordPatternRe.exec(O)}
- t+=O.substr(e),M.addText(t)}(),O=""}function g(e){
- return e.className&&M.openNode(e.className),y=Object.create(e,{parent:{value:y}
- })}function h(e,t,r){let a=function(e,n){var t=e&&e.exec(n)
- ;return t&&0===t.index}(e.endRe,r);if(a){if(e["on:end"]){const r=new n(e)
- ;e["on:end"](t,r),r.ignore&&(a=!1)}if(a){for(;e.endsParent&&e.parent;)e=e.parent
- ;return e}}if(e.endsWithParent)return h(e.parent,t,r)}function f(e){
- return 0===y.matcher.regexIndex?(O+=e[0],1):(S=!0,0)}function b(e){
- var n=e[0],t=s.substr(e.index),r=h(y,e,t);if(!r)return B;var a=y
- ;a.skip?O+=n:(a.returnEnd||a.excludeEnd||(O+=n),c(),a.excludeEnd&&(O=n));do{
- y.className&&M.closeNode(),y.skip||y.subLanguage||(L+=y.relevance),y=y.parent
- }while(y!==r.parent)
- ;return r.starts&&(r.endSameAsBegin&&(r.starts.endRe=r.endRe),
- g(r.starts)),a.returnEnd?0:n.length}var v={};function x(t,a){var i=a&&a[0]
- ;if(O+=t,null==i)return c(),0
- ;if("begin"===v.type&&"end"===a.type&&v.index===a.index&&""===i){
- if(O+=s.slice(a.index,a.index+1),!o){const n=Error("0 width match regex")
- ;throw n.languageName=e,n.badRule=v.rule,n}return 1}
- if(v=a,"begin"===a.type)return function(e){var t=e[0],r=e.rule
- ;const a=new n(r),i=[r.__beforeBegin,r["on:begin"]]
- ;for(const n of i)if(n&&(n(e,a),a.ignore))return f(t)
- ;return r&&r.endSameAsBegin&&(r.endRe=RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")),
- r.skip?O+=t:(r.excludeBegin&&(O+=t),
- c(),r.returnBegin||r.excludeBegin||(O=t)),g(r),r.returnBegin?0:t.length}(a)
- ;if("illegal"===a.type&&!r){
- const e=Error('Illegal lexeme "'+i+'" for mode "'+(y.className||"")+'"')
- ;throw e.mode=y,e}if("end"===a.type){var l=b(a);if(l!==B)return l}
- if("illegal"===a.type&&""===i)return 1
- ;if(T>1e5&&T>3*a.index)throw Error("potential infinite loop, way more iterations than matches")
- ;return O+=i,i.length}var _=E(e)
- ;if(!_)throw console.error(u.replace("{}",e)),Error('Unknown language: "'+e+'"')
- ;var w=k(_),N="",y=i||w,R={},M=new d.__emitter(d);!function(){
- for(var e=[],n=y;n!==_;n=n.parent)n.className&&e.unshift(n.className)
- ;e.forEach((e=>M.openNode(e)))}();var O="",L=0,j=0,T=0,S=!1;try{
- for(y.matcher.considerAll();;){
- T++,S?S=!1:y.matcher.considerAll(),y.matcher.lastIndex=j
- ;const e=y.matcher.exec(s);if(!e)break;const n=x(s.substring(j,e.index),e)
- ;j=e.index+n}return x(s.substr(j)),M.closeAllNodes(),M.finalize(),N=M.toHTML(),{
- relevance:L,value:N,language:e,illegal:!1,emitter:M,top:y}}catch(n){
- if(n.message&&n.message.includes("Illegal"))return{illegal:!0,illegalBy:{
- msg:n.message,context:s.slice(j-100,j+100),mode:n.mode},sofar:N,relevance:0,
- value:I(s),emitter:M};if(o)return{illegal:!1,relevance:0,value:I(s),emitter:M,
- language:e,top:y,errorRaised:n};throw n}}function m(e,n){
- n=n||d.languages||Object.keys(a);var t=function(e){const n={relevance:0,
- emitter:new d.__emitter(d),value:I(e),illegal:!1,top:g}
- ;return n.emitter.addText(e),n}(e),r=t
- ;return n.filter(E).filter(w).forEach((function(n){var a=p(n,e,!1);a.language=n,
- a.relevance>r.relevance&&(r=a),a.relevance>t.relevance&&(r=t,t=a)
- })),r.language&&(t.second_best=r),t}function b(e){
- return d.tabReplace||d.useBR?e.replace(l,(e=>"\n"===e?d.useBR?"
":e:d.tabReplace?e.replace(/\t/g,d.tabReplace):e)):e
- }function v(e){let n=null;const t=function(e){var n=e.className+" "
- ;n+=e.parentNode?e.parentNode.className:"";const t=d.languageDetectRe.exec(n)
- ;if(t){var r=E(t[1])
- ;return r||(console.warn(u.replace("{}",t[1])),console.warn("Falling back to no-highlight mode for this block.",e)),
- r?t[1]:"no-highlight"}return n.split(/\s+/).find((e=>h(e)||E(e)))}(e)
- ;if(h(t))return;N("before:highlightBlock",{block:e,language:t
- }),d.useBR?(n=document.createElement("div"),
- n.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/
/g,"\n")):n=e
- ;const r=n.textContent,a=t?f(t,r,!0):m(r),s=S(n);if(s.length){
- const e=document.createElement("div");e.innerHTML=a.value,a.value=A(s,S(e),r)}
- a.value=b(a.value),N("after:highlightBlock",{block:e,result:a
- }),e.innerHTML=a.value,e.className=function(e,n,t){var r=n?i[n]:t,a=[e.trim()]
- ;return e.match(/\bhljs\b/)||a.push("hljs"),
- e.includes(r)||a.push(r),a.join(" ").trim()
- }(e.className,t,a.language),e.result={language:a.language,re:a.relevance,
- relavance:a.relevance},a.second_best&&(e.second_best={
- language:a.second_best.language,re:a.second_best.relevance,
- relavance:a.second_best.relevance})}const x=()=>{if(!x.called){x.called=!0
- ;var e=document.querySelectorAll("pre code");r.forEach.call(e,v)}}
- ;function E(e){return e=(e||"").toLowerCase(),a[e]||a[i[e]]}
- function _(e,{languageName:n}){"string"==typeof e&&(e=[e]),e.forEach((e=>{i[e]=n
- }))}function w(e){var n=E(e);return n&&!n.disableAutodetect}function N(e,n){
- var t=e;s.forEach((function(e){e[t]&&e[t](n)}))}Object.assign(t,{highlight:f,
- highlightAuto:m,fixMarkup:function(e){
- return console.warn("fixMarkup is deprecated and will be removed entirely in v11.0"),
- console.warn("Please see https://github.com/highlightjs/highlight.js/issues/2534"),
- b(e)},highlightBlock:v,configure:function(e){
- e.useBR&&(console.warn("'useBR' option is deprecated and will be removed entirely in v11.0"),
- console.warn("Please see https://github.com/highlightjs/highlight.js/issues/2559")),
- d=T(d,e)},initHighlighting:x,initHighlightingOnLoad:function(){
- window.addEventListener("DOMContentLoaded",x,!1)},
- registerLanguage:function(e,n){var r=null;try{r=n(t)}catch(n){
- if(console.error("Language definition for '{}' could not be registered.".replace("{}",e)),
- !o)throw n;console.error(n),r=g}
- r.name||(r.name=e),a[e]=r,r.rawDefinition=n.bind(null,t),
- r.aliases&&_(r.aliases,{languageName:e})},listLanguages:function(){
- return Object.keys(a)},getLanguage:E,registerAliases:_,
- requireLanguage:function(e){var n=E(e);if(n)return n
- ;throw Error("The '{}' language is required, but not loaded.".replace("{}",e))},
- autoDetection:w,inherit:T,addPlugin:function(e){s.push(e)},vuePlugin:j
- }),t.debugMode=function(){o=!1},t.safeMode=function(){o=!0
- },t.versionString="10.3.2";for(const n in y)"object"==typeof y[n]&&e(y[n])
- ;return Object.assign(t,y),t}({})}()
- ;"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs);
- hljs.registerLanguage("apache",function(){"use strict";return function(e){
- var 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:{
- nomarkup:"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:"\\d+"},e.QUOTE_STRING_MODE]}
- }],illegal:/\S/}}}());
- hljs.registerLanguage("bash",function(){"use strict";return function(e){
- const s={};Object.assign(s,{className:"variable",variants:[{
- begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,
- contains:[s]}]}]});const n={className:"subst",begin:/\$\(/,end:/\)/,
- contains:[e.BACKSLASH_ESCAPE]},t={begin:/<<-?\s*(?=\w+)/,starts:{
- contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}
- },a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,n]}
- ;n.contains.push(a);const i={begin:/\$\(\(/,end:/\)\)/,contains:[{
- begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,s]},c=e.SHEBANG({
- binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10}),o={
- className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,
- contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{
- name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z._-]+\b/,
- keyword:"if then else elif fi for while in do done case esac function",
- literal:"true false",
- built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp"
- },contains:[c,e.SHEBANG(),o,i,e.COMMENT("(?")+")",i={
- className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},s={className:"string",
- variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",
- contains:[e.BACKSLASH_ESCAPE]},{
- begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",
- end:"'",illegal:"."},e.END_SAME_AS_BEGIN({
- begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},o={
- className:"number",variants:[{begin:"\\b(0b[01']+)"},{
- begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{
- begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"
- }],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{
- "meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"
- },contains:[{begin:/\\\n/,relevance:0},e.inherit(s,{className:"meta-string"}),{
- className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n"
- },n,e.C_BLOCK_COMMENT_MODE]},l={className:"title",begin:t(r)+e.IDENT_RE,
- relevance:0},d=t(r)+e.IDENT_RE+"\\s*\\(",u={
- keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq",
- built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary",
- literal:"true false nullptr NULL"},m=[c,i,n,e.C_BLOCK_COMMENT_MODE,o,s],p={
- variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{
- beginKeywords:"new throw return else",end:/;/}],keywords:u,contains:m.concat([{
- begin:/\(/,end:/\)/,keywords:u,contains:m.concat(["self"]),relevance:0}]),
- relevance:0},_={className:"function",begin:"("+a+"[\\*&\\s]+)+"+d,
- returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:u,illegal:/[^\w\s\*&:<>]/,
- contains:[{begin:"decltype\\(auto\\)",keywords:u,relevance:0},{begin:d,
- returnBegin:!0,contains:[l],relevance:0},{className:"params",begin:/\(/,
- end:/\)/,keywords:u,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,s,o,i,{
- begin:/\(/,end:/\)/,keywords:u,relevance:0,
- contains:["self",n,e.C_BLOCK_COMMENT_MODE,s,o,i]}]
- },i,n,e.C_BLOCK_COMMENT_MODE,c]};return{
- aliases:["c","cc","h","c++","h++","hpp","hh","hxx","cxx"],keywords:u,
- disableAutodetect:!0,illegal:"",contains:[].concat(p,_,m,[c,{
- begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",
- end:">",keywords:u,contains:["self",i]},{begin:e.IDENT_RE+"::",keywords:u},{
- className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,
- contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{
- preprocessor:c,strings:s,keywords:u}}}}());
- hljs.registerLanguage("c",function(){"use strict";return function(e){
- var n=e.requireLanguage("c-like").rawDefinition()
- ;return n.name="C",n.aliases=["c","h"],n}}());
- hljs.registerLanguage("coffeescript",function(){"use strict"
- ;const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"])
- ;return function(r){var t,i={
- keyword:e.concat(["then","unless","until","loop","by","when","and","or","is","isnt","not"]).filter((t=["var","const","let","function","static"],
- e=>!t.includes(e))).join(" "),
- literal:n.concat(["yes","no","on","off"]).join(" "),
- built_in:a.concat(["npm","print"]).join(" ")},s="[A-Za-z$_][0-9A-Za-z$_]*",o={
- className:"subst",begin:/#\{/,end:/}/,keywords:i
- },c=[r.BINARY_NUMBER_MODE,r.inherit(r.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",
- relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/,
- contains:[r.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[r.BACKSLASH_ESCAPE]
- },{begin:/"""/,end:/"""/,contains:[r.BACKSLASH_ESCAPE,o]},{begin:/"/,end:/"/,
- contains:[r.BACKSLASH_ESCAPE,o]}]},{className:"regexp",variants:[{begin:"///",
- end:"///",contains:[o,r.HASH_COMMENT_MODE]},{begin:"//[gim]{0,3}(?=\\W)",
- relevance:0},{begin:/\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/}]},{begin:"@"+s
- },{subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,variants:[{
- begin:"```",end:"```"},{begin:"`",end:"`"}]}];o.contains=c
- ;var l=r.inherit(r.TITLE_MODE,{begin:s}),d="(\\(.*\\))?\\s*\\B[-=]>",g={
- className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,
- end:/\)/,keywords:i,contains:["self"].concat(c)}]};return{name:"CoffeeScript",
- aliases:["coffee","cson","iced"],keywords:i,illegal:/\/\*/,
- contains:c.concat([r.COMMENT("###","###"),r.HASH_COMMENT_MODE,{
- className:"function",begin:"^\\s*"+s+"\\s*=\\s*"+d,end:"[-=]>",returnBegin:!0,
- contains:[l,g]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",
- begin:d,end:"[-=]>",returnBegin:!0,contains:[g]}]},{className:"class",
- beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{
- beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[l]},l]
- },{begin:s+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}}());
- hljs.registerLanguage("cpp",function(){"use strict";return function(e){
- var i=e.requireLanguage("c-like").rawDefinition();return i.disableAutodetect=!1,
- i.name="C++",i.aliases=["cc","c++","h++","hpp","hh","hxx","cxx"],i}}());
- hljs.registerLanguage("csharp",function(){"use strict";return function(e){
- var n={
- keyword:["abstract","as","base","break","case","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"].concat(["add","alias","and","ascending","async","await","by","descending","equals","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","remove","select","set","unmanaged","value","var","when","where","with","yield"]).join(" "),
- built_in:"bool byte char decimal delegate double dynamic enum float int long nint nuint object sbyte short string ulong unit ushort",
- literal:"default false null true"},i=e.inherit(e.TITLE_MODE,{
- begin:"[a-zA-Z](\\.?\\w)*"}),a={className:"number",variants:[{
- begin:"\\b(0b[01']+)"},{
- begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{
- begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"
- }],relevance:0},s={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]
- },t=e.inherit(s,{illegal:/\n/}),r={className:"subst",begin:"{",end:"}",
- keywords:n},l=e.inherit(r,{illegal:/\n/}),c={className:"string",begin:/\$"/,
- end:'"',illegal:/\n/,contains:[{begin:"{{"},{begin:"}}"},e.BACKSLASH_ESCAPE,l]
- },o={className:"string",begin:/\$@"/,end:'"',contains:[{begin:"{{"},{begin:"}}"
- },{begin:'""'},r]},d=e.inherit(o,{illegal:/\n/,contains:[{begin:"{{"},{
- begin:"}}"},{begin:'""'},l]})
- ;r.contains=[o,c,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.C_BLOCK_COMMENT_MODE],
- l.contains=[d,c,t,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.inherit(e.C_BLOCK_COMMENT_MODE,{
- illegal:/\n/})];var g={variants:[o,c,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]
- },E={begin:"<",end:">",contains:[{beginKeywords:"in out"},i]
- },_=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",b={
- begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],
- keywords:n,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,
- contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{
- begin:"\x3c!--|--\x3e"},{begin:"?",end:">"}]}]
- }),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",
- end:"$",keywords:{
- "meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"
- }},g,a,{beginKeywords:"class interface",end:/[{;=]/,illegal:/[^\s:,]/,
- contains:[{beginKeywords:"where class"
- },i,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",
- end:/[{;=]/,illegal:/[^\s:]/,
- contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{
- beginKeywords:"record",end:/[{;=]/,illegal:/[^\s:]/,
- contains:[i,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",
- begin:"^\\s*\\[",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{
- className:"meta-string",begin:/"/,end:/"/}]},{
- beginKeywords:"new return throw await else",relevance:0},{className:"function",
- begin:"("+_+"\\s+)+"+e.IDENT_RE+"\\s*(\\<.+\\>)?\\s*\\(",returnBegin:!0,
- end:/\s*[{;=]/,excludeEnd:!0,keywords:n,contains:[{
- beginKeywords:"public private protected static internal protected abstract async extern override unsafe virtual new sealed partial"
- },{begin:e.IDENT_RE+"\\s*(\\<.+\\>)?\\s*\\(",returnBegin:!0,
- contains:[e.TITLE_MODE,E],relevance:0},{className:"params",begin:/\(/,end:/\)/,
- excludeBegin:!0,excludeEnd:!0,keywords:n,relevance:0,
- contains:[g,a,e.C_BLOCK_COMMENT_MODE]
- },e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},b]}}}());
- hljs.registerLanguage("css",function(){"use strict";return function(e){var n={
- begin:/(?:[A-Z\_\.\-]+|--[a-zA-Z0-9_-]+)\s*:/,returnBegin:!0,end:";",
- endsWithParent:!0,contains:[{className:"attribute",begin:/\S/,end:":",
- excludeEnd:!0,starts:{endsWithParent:!0,excludeEnd:!0,contains:[{
- begin:/[\w-]+\(/,returnBegin:!0,contains:[{className:"built_in",begin:/[\w-]+/
- },{begin:/\(/,end:/\)/,
- contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}]
- },e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{
- className:"number",begin:"#[0-9A-Fa-f]+"},{className:"meta",begin:"!important"}]
- }}]};return{name:"CSS",case_insensitive:!0,illegal:/[=\/|'\$]/,
- contains:[e.C_BLOCK_COMMENT_MODE,{className:"selector-id",
- begin:/#[A-Za-z0-9_-]+/},{className:"selector-class",begin:/\.[A-Za-z0-9_-]+/},{
- className:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",
- contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},{className:"selector-pseudo",
- begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"@(page|font-face)",
- lexemes:"@[a-z-]+",keywords:"@page @font-face"},{begin:"@",end:"[{;]",
- illegal:/:/,returnBegin:!0,contains:[{className:"keyword",
- begin:/@\-?\w[\w]*(\-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,
- relevance:0,keywords:"and or not only",contains:[{begin:/[a-z-]+:/,
- className:"attribute"},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]
- }]},{className:"selector-tag",begin:"[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},{
- begin:"{",end:"}",illegal:/\S/,contains:[e.C_BLOCK_COMMENT_MODE,n]}]}}}());
- hljs.registerLanguage("diff",function(){"use strict";return function(e){return{
- name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,
- variants:[{begin:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{
- begin:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{begin:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{
- className:"comment",variants:[{begin:/Index: /,end:/$/},{begin:/={3,}/,end:/$/
- },{begin:/^\-{3}/,end:/$/},{begin:/^\*{3} /,end:/$/},{begin:/^\+{3}/,end:/$/},{
- begin:/^\*{15}$/}]},{className:"addition",begin:"^\\+",end:"$"},{
- className:"deletion",begin:"^\\-",end:"$"},{className:"addition",begin:"^\\!",
- end:"$"}]}}}());
- hljs.registerLanguage("go",function(){"use strict";return function(e){var n={
- keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",
- literal:"true false iota nil",
- built_in:"append cap close complex copy imag len make new panic print println real recover delete"
- };return{name:"Go",aliases:["golang"],keywords:n,illegal:"",
- contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",
- variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{
- className:"number",variants:[{begin:e.C_NUMBER_RE+"[i]",relevance:1
- },e.C_NUMBER_MODE]},{begin:/:=/},{className:"function",beginKeywords:"func",
- end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",
- begin:/\(/,end:/\)/,keywords:n,illegal:/["']/}]}]}}}());
- hljs.registerLanguage("http",function(){"use strict";return function(e){
- var n="HTTP/[0-9\\.]+";return{name:"HTTP",aliases:["https"],illegal:"\\S",
- contains:[{begin:"^"+n,end:"$",contains:[{className:"number",
- begin:"\\b\\d{3}\\b"}]},{begin:"^[A-Z]+ (.*?) "+n+"$",returnBegin:!0,end:"$",
- contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{
- begin:n},{className:"keyword",begin:"[A-Z]+"}]},{className:"attribute",
- begin:"^\\w",end:": ",excludeEnd:!0,illegal:"\\n|\\s|=",starts:{end:"$",
- relevance:0}},{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}]}}}());
- hljs.registerLanguage("ini",function(){"use strict";function e(e){
- return e?"string"==typeof e?e:e.source:null}function n(...n){
- return n.map((n=>e(n))).join("")}return function(a){var s={className:"number",
- relevance:0,variants:[{begin:/([\+\-]+)?[\d]+_[\d_]+/},{begin:a.NUMBER_RE}]
- },i=a.COMMENT();i.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];var t={
- className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)}/}]
- },r={className:"literal",begin:/\bon|off|true|false|yes|no\b/},l={
- className:"string",contains:[a.BACKSLASH_ESCAPE],variants:[{begin:"'''",
- end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'
- },{begin:"'",end:"'"}]},c={begin:/\[/,end:/\]/,contains:[i,r,t,l,s,"self"],
- relevance:0
- },g="("+[/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/].map((n=>e(n))).join("|")+")"
- ;return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,
- contains:[i,{className:"section",begin:/\[+/,end:/\]+/},{
- begin:n(g,"(\\s*\\.\\s*",g,")*",n("(?=",/\s*=\s*[^#\s]/,")")),className:"attr",
- starts:{end:/$/,contains:[i,c,r,t,l,s]}}]}}}());
- hljs.registerLanguage("java",function(){"use strict";function e(e){
- return e?"string"==typeof e?e:e.source:null}function n(e){return a("(",e,")?")}
- function a(...n){return n.map((n=>e(n))).join("")}function s(...n){
- return"("+n.map((n=>e(n))).join("|")+")"}return function(e){
- var r="false synchronized int abstract float private char boolean var static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",i={
- className:"meta",begin:"@[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*",
- contains:[{begin:/\(/,end:/\)/,contains:["self"]}]
- },t=e=>a("[",e,"]+([",e,"_]*[",e,"]+)?"),c={className:"number",variants:[{
- begin:`\\b(0[bB]${t("01")})[lL]?`},{begin:`\\b(0${t("0-7")})[dDfFlL]?`},{
- begin:a(/\b0[xX]/,s(a(t("a-fA-F0-9"),/\./,t("a-fA-F0-9")),a(t("a-fA-F0-9"),/\.?/),a(/\./,t("a-fA-F0-9"))),/([pP][+-]?(\d+))?/,/[fFdDlL]?/)
- },{begin:a(/\b/,s(a(/\d*\./,t("\\d")),t("\\d")),/[eE][+-]?[\d]+[dDfF]?/)},{
- begin:a(/\b/,t(/\d/),n(/\.?/),n(t(/\d/)),/[dDfFlL]?/)}],relevance:0};return{
- name:"Java",aliases:["jsp"],keywords:r,illegal:/<\/|#/,
- contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,
- relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]
- }),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{
- className:"class",beginKeywords:"class interface enum",end:/[{;=]/,
- excludeEnd:!0,keywords:"class interface enum",illegal:/[:"\[\]]/,contains:[{
- beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{
- beginKeywords:"new throw return else",relevance:0},{className:"class",
- begin:"record\\s+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,excludeEnd:!0,
- end:/[{;=]/,keywords:r,contains:[{beginKeywords:"record"},{
- begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,
- contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,
- keywords:r,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE]
- },e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"function",
- begin:"([\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*(<[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*(\\s*,\\s*[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*)*>)?\\s+)+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(",
- returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:r,contains:[{
- begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,
- contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,
- keywords:r,relevance:0,
- contains:[i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]
- },e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},c,i]}}}());
- hljs.registerLanguage("javascript",function(){"use strict"
- ;const e="[A-Za-z$_][0-9A-Za-z$_]*",n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],a=["true","false","null","undefined","NaN","Infinity"],s=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"])
- ;function r(e){return i("(?=",e,")")}function t(e){return i("(",e,")?")}
- function i(...e){return e.map((e=>{
- return(n=e)?"string"==typeof n?n:n.source:null;var n})).join("")}
- return function(c){const o=e,l={begin:/<[A-Za-z0-9\\._:-]+/,
- end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,n)=>{
- const a=e[0].length+e.index,s=e.input[a];"<"!==s?">"===s&&(((e,{after:n})=>{
- const a=e[0].replace("<","");return-1!==e.input.indexOf(a,n)})(e,{after:a
- })||n.ignoreMatch()):n.ignoreMatch()}},g={$pattern:e,keyword:n.join(" "),
- literal:a.join(" "),built_in:s.join(" ")
- },d=(e,n)=>`\\b0[${e}][${n}]([${n}_]*[${n}])?n?`,b=/[1-9]([0-9_]*\d)?/,E=/\d([0-9_]*\d)?/,u=i(/[eE][+-]?/,E),_={
- className:"number",variants:[{begin:d("bB","01")},{begin:d("oO","0-7")},{
- begin:d("xX","0-9a-fA-F")},{begin:i(/\b/,b,"n")},{begin:i(/(\b0)?\./,E,t(u))},{
- begin:i(/\b/,b,t(i(/\./,t(E))),t(u))},{begin:/\b0[\.n]?/}],relevance:0},m={
- className:"subst",begin:"\\$\\{",end:"\\}",keywords:g,contains:[]},N={
- begin:"html`",end:"",starts:{end:"`",returnEnd:!1,
- contains:[c.BACKSLASH_ESCAPE,m],subLanguage:"xml"}},y={begin:"css`",end:"",
- starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,m],subLanguage:"css"}
- },f={className:"string",begin:"`",end:"`",contains:[c.BACKSLASH_ESCAPE,m]},A={
- className:"comment",variants:[c.COMMENT("/\\*\\*","\\*/",{relevance:0,
- contains:[{className:"doctag",begin:"@[A-Za-z]+",contains:[{className:"type",
- begin:"\\{",end:"\\}",relevance:0},{className:"variable",
- begin:o+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,
- relevance:0}]}]}),c.C_BLOCK_COMMENT_MODE,c.C_LINE_COMMENT_MODE]
- },p=[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,N,y,f,_,c.REGEXP_MODE]
- ;m.contains=p.concat({begin:/{/,end:/}/,keywords:g,contains:["self"].concat(p)})
- ;const O=[].concat(A,m.contains),T=O.concat([{begin:/\(/,end:/\)/,keywords:g,
- contains:["self"].concat(O)}]),R={className:"params",begin:/\(/,end:/\)/,
- excludeBegin:!0,excludeEnd:!0,keywords:g,contains:T};return{name:"Javascript",
- aliases:["js","jsx","mjs","cjs"],keywords:g,exports:{PARAMS_CONTAINS:T},
- illegal:/#(?![$_A-z])/,contains:[c.SHEBANG({label:"shebang",binary:"node",
- relevance:5}),{label:"use_strict",className:"meta",relevance:10,
- begin:/^\s*['"]use (strict|asm)['"]/
- },c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,N,y,f,A,_,{
- begin:i(/[{,\n]\s*/,r(i(/(\/\/.*$)*/,/(\/\*(.|\n)*\*\/)*/,/\s*/,o+"\\s*:"))),
- relevance:0,contains:[{className:"attr",begin:o+r("\\s*:"),relevance:0}]},{
- begin:"("+c.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",
- keywords:"return throw case",contains:[A,c.REGEXP_MODE,{className:"function",
- begin:"(\\([^()]*(\\([^()]*(\\([^()]*\\))*[^()]*\\))*[^()]*\\)|"+c.UNDERSCORE_IDENT_RE+")\\s*=>",
- returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{
- begin:c.UNDERSCORE_IDENT_RE},{className:null,begin:/\(\s*\)/,skip:!0},{
- begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:g,contains:T}]}]},{
- begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{variants:[{
- begin:"<>",end:">"},{begin:l.begin,"on:begin":l.isTrulyOpeningTag,end:l.end}],
- subLanguage:"xml",contains:[{begin:l.begin,end:l.end,skip:!0,contains:["self"]}]
- }],relevance:0},{className:"function",beginKeywords:"function",end:/[{;]/,
- excludeEnd:!0,keywords:g,contains:["self",c.inherit(c.TITLE_MODE,{begin:o}),R],
- illegal:/%/},{className:"function",
- begin:c.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\))*[^()]*\\))*[^()]*\\)\\s*{",
- returnBegin:!0,contains:[R,c.inherit(c.TITLE_MODE,{begin:o})]},{variants:[{
- begin:"\\."+o},{begin:"\\$"+o}],relevance:0},{className:"class",
- beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"\[\]]/,contains:[{
- beginKeywords:"extends"},c.UNDERSCORE_TITLE_MODE]},{begin:/\b(?=constructor)/,
- end:/[\{;]/,excludeEnd:!0,contains:[c.inherit(c.TITLE_MODE,{begin:o}),"self",R]
- },{begin:"(get|set)\\s+(?="+o+"\\()",end:/{/,keywords:"get set",
- contains:[c.inherit(c.TITLE_MODE,{begin:o}),{begin:/\(\)/},R]},{begin:/\$[(.]/}]
- }}}());
- hljs.registerLanguage("json",function(){"use strict";return function(n){var e={
- literal:"true false null"
- },i=[n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE],t=[n.QUOTE_STRING_MODE,n.C_NUMBER_MODE],a={
- end:",",endsWithParent:!0,excludeEnd:!0,contains:t,keywords:e},l={begin:"{",
- end:"}",contains:[{className:"attr",begin:/"/,end:/"/,
- contains:[n.BACKSLASH_ESCAPE],illegal:"\\n"},n.inherit(a,{begin:/:/
- })].concat(i),illegal:"\\S"},s={begin:"\\[",end:"\\]",contains:[n.inherit(a)],
- illegal:"\\S"};return t.push(l,s),i.forEach((function(n){t.push(n)})),{
- name:"JSON",contains:t,keywords:e,illegal:"\\S"}}}());
- hljs.registerLanguage("kotlin",function(){"use strict";return function(e){
- var n={
- keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",
- built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",
- literal:"true false null"},a={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"
- },i={className:"subst",begin:"\\${",end:"}",contains:[e.C_NUMBER_MODE]},s={
- className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},t={className:"string",
- variants:[{begin:'"""',end:'"""(?=[^"])',contains:[s,i]},{begin:"'",end:"'",
- illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,
- contains:[e.BACKSLASH_ESCAPE,s,i]}]};i.contains.push(t);var r={className:"meta",
- begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"
- },l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,
- end:/\)/,contains:[e.inherit(t,{className:"meta-string"})]}]
- },c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),o={variants:[{
- className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]
- },d=o;return d.variants[1].contains=[o],o.variants[1].contains=[d],{
- name:"Kotlin",aliases:["kt"],keywords:n,contains:[e.COMMENT("/\\*\\*","\\*/",{
- relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]
- }),e.C_LINE_COMMENT_MODE,c,{className:"keyword",
- begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",
- begin:/@\w+/}]}},a,r,l,{className:"function",beginKeywords:"fun",end:"[(]|$",
- returnBegin:!0,excludeEnd:!0,keywords:n,
- illegal:/fun\s+(<.*>)?[^\s\(]+(\s+[^\s\(]+)\s*=/,relevance:5,contains:[{
- begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,
- contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/,end:/>/,
- keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,
- endsParent:!0,keywords:n,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,
- endsWithParent:!0,contains:[o,e.C_LINE_COMMENT_MODE,c],relevance:0
- },e.C_LINE_COMMENT_MODE,c,r,l,t,e.C_NUMBER_MODE]},c]},{className:"class",
- beginKeywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,
- illegal:"extends implements",contains:[{
- beginKeywords:"public protected internal private constructor"
- },e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/,end:/>/,excludeBegin:!0,
- excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,]|$/,
- excludeBegin:!0,returnEnd:!0},r,l]},t,{className:"meta",begin:"^#!/usr/bin/env",
- end:"$",illegal:"\n"},{className:"number",
- begin:"\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",
- relevance:0}]}}}());
- hljs.registerLanguage("less",function(){"use strict";return function(e){
- var n="([\\w-]+|@{[\\w-]+})",a=[],s=[],t=function(e){return{className:"string",
- begin:"~?"+e+".*?"+e}},r=function(e,n,a){return{className:e,begin:n,relevance:a}
- },i={begin:"\\(",end:"\\)",contains:s,relevance:0}
- ;s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t("'"),t('"'),e.CSS_NUMBER_MODE,{
- begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",
- excludeEnd:!0}
- },r("number","#[0-9A-Fa-f]+\\b"),i,r("variable","@@?[\\w-]+",10),r("variable","@{[\\w-]+}"),r("built_in","~?`[^`]*?`"),{
- className:"attribute",begin:"[\\w-]+\\s*:",end:":",returnBegin:!0,excludeEnd:!0
- },{className:"meta",begin:"!important"});var c=s.concat({begin:"{",end:"}",
- contains:a}),l={beginKeywords:"when",endsWithParent:!0,contains:[{
- beginKeywords:"and not"}].concat(s)},o={begin:n+"\\s*:",returnBegin:!0,
- end:"[;}]",relevance:0,contains:[{className:"attribute",begin:n,end:":",
- excludeEnd:!0,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s}
- }]},g={className:"keyword",
- begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",
- starts:{end:"[;{}]",returnEnd:!0,contains:s,relevance:0}},d={
- className:"variable",variants:[{begin:"@[\\w-]+\\s*:",relevance:15},{
- begin:"@[\\w-]+"}],starts:{end:"[;}]",returnEnd:!0,contains:c}},b={variants:[{
- begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:n,end:"{"}],returnBegin:!0,
- returnEnd:!0,illegal:"[<='$\"]",relevance:0,
- contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l,r("keyword","all\\b"),r("variable","@{[\\w-]+}"),r("selector-tag",n+"%?",0),r("selector-id","#"+n),r("selector-class","\\."+n,0),r("selector-tag","&",0),{
- className:"selector-attr",begin:"\\[",end:"\\]"},{className:"selector-pseudo",
- begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"\\(",end:"\\)",contains:c},{
- begin:"!important"}]}
- ;return a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,g,d,o,b),{
- name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:a}}}());
- hljs.registerLanguage("lua",function(){"use strict";return function(e){
- var t="\\[=*\\[",a="\\]=*\\]",n={begin:t,end:a,contains:["self"]
- },o=[e.COMMENT("--(?!\\[=*\\[)","$"),e.COMMENT("--\\[=*\\[",a,{contains:[n],
- relevance:10})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE,
- literal:"true false nil",
- keyword:"and break do else elseif end for goto if in local not or repeat return then until while",
- built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"
- },contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)",
- contains:[e.inherit(e.TITLE_MODE,{
- begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",
- begin:"\\(",endsWithParent:!0,contains:o}].concat(o)
- },e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",
- begin:t,end:a,contains:[n],relevance:5}])}}}());
- hljs.registerLanguage("makefile",function(){"use strict";return function(e){
- var i={className:"variable",variants:[{
- begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{
- begin:/\$[@%\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,
- contains:[e.BACKSLASH_ESCAPE,i]},a={className:"variable",begin:/\$\([\w-]+\s/,
- end:/\)/,keywords:{
- built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"
- },contains:[i]},r={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},s={
- className:"section",begin:/^[^\s]+:/,end:/$/,contains:[i]};return{
- name:"Makefile",aliases:["mk","mak"],keywords:{$pattern:/[\w-]+/,
- keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"
- },contains:[e.HASH_COMMENT_MODE,i,n,a,r,{className:"meta",begin:/^\.PHONY:/,
- end:/$/,keywords:{$pattern:/[\.\w]+/,"meta-keyword":".PHONY"}},s]}}}());
- hljs.registerLanguage("xml",function(){"use strict";return function(e){var n={
- className:"symbol",begin:"&[a-z]+;|[0-9]+;|[a-f0-9]+;"},a={begin:"\\s",
- contains:[{className:"meta-keyword",begin:"#?[a-z_][a-z1-9_-]+",illegal:"\\n"}]
- },s=e.inherit(a,{begin:"\\(",end:"\\)"}),t=e.inherit(e.APOS_STRING_MODE,{
- className:"meta-string"}),i=e.inherit(e.QUOTE_STRING_MODE,{
- className:"meta-string"}),c={endsWithParent:!0,illegal:/,relevance:0,
- contains:[{className:"attr",begin:"[A-Za-z0-9\\._:-]+",relevance:0},{
- begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{
- begin:/"/,end:/"/,contains:[n]},{begin:/'/,end:/'/,contains:[n]},{
- begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",
- aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],
- case_insensitive:!0,contains:[{className:"meta",begin:"",
- relevance:10,contains:[a,i,t,s,{begin:"\\[",end:"\\]",contains:[{
- className:"meta",begin:"",contains:[a,s,i,t]}]}]
- },e.COMMENT("\x3c!--","--\x3e",{relevance:10}),{begin:"<\\!\\[CDATA\\[",
- end:"\\]\\]>",relevance:10},n,{className:"meta",begin:/<\?xml/,end:/\?>/,
- relevance:10},{className:"tag",begin:"",returnEnd:!0,
- subLanguage:["css","xml"]}},{className:"tag",begin:"