annotate third_party/highlight/es/languages/python.min.js @ 279:b3b547563ec7

Add Google connector service and agent wiki Implement the C/Seobeo Google Drive and Gmail connector with encrypted OAuth storage, Zenbu authentication, browser testing, AI tool discovery, chunked HTTP decoding, and Bazel coverage. Consolidate repository guidance into progressive wiki documentation and enforce arena-first allocation for new first-party C code. Co-authored-by: Copilot <[email protected]> Copilot-Session: 84c338fd-0939-4bb3-b7f3-1062eb213e5d
author MrJuneJune <me@mrjunejune.com>
date Mon, 17 Aug 2026 22:22:36 -0700
parents 2db6253f355d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
157
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
1 /*! `python` grammar compiled for Highlight.js 11.11.1 */
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
2 var hljsGrammar=(()=>{"use strict";return e=>{
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
3 const n=e.regex,a=/[\p{XID_Start}_]\p{XID_Continue}*/u,s=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],t={
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
4 $pattern:/[A-Za-z]\w+|__\w+__/,keyword:s,
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
5 built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
6 literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
7 type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
8 },i={className:"meta",begin:/^(>>>|\.\.\.) /},r={className:"subst",begin:/\{/,
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
9 end:/\}/,keywords:t,illegal:/#/},l={begin:/\{\{/,relevance:0},o={
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
10 className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
11 begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
12 contains:[e.BACKSLASH_ESCAPE,i],relevance:10},{
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
13 begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
14 contains:[e.BACKSLASH_ESCAPE,i],relevance:10},{
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
15 begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
16 contains:[e.BACKSLASH_ESCAPE,i,l,r]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
17 end:/"""/,contains:[e.BACKSLASH_ESCAPE,i,l,r]},{begin:/([uU]|[rR])'/,end:/'/,
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
18 relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
19 begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
20 end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
21 contains:[e.BACKSLASH_ESCAPE,l,r]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
22 contains:[e.BACKSLASH_ESCAPE,l,r]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
23 },b="[0-9](_?[0-9])*",c=`(\\b(${b}))?\\.(${b})|\\b(${b})\\.`,d="\\b|"+s.join("|"),m={
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
24 className:"number",relevance:0,variants:[{
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
25 begin:`(\\b(${b})|(${c}))[eE][+-]?(${b})[jJ]?(?=${d})`},{begin:`(${c})[jJ]?`},{
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
26 begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`},{
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
27 begin:`\\b0[bB](_?[01])+[lL]?(?=${d})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${d})`
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
28 },{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`},{begin:`\\b(${b})[jJ](?=${d})`
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
29 }]},g={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:t,
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
30 contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},p={
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
31 className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
32 end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
33 contains:["self",i,m,o,e.HASH_COMMENT_MODE]}]};return r.contains=[o,m,i],{
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
34 name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:t,
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
35 illegal:/(<\/|\?)|=>/,contains:[i,m,{scope:"variable.language",match:/\bself\b/
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
36 },{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
37 },o,g,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,a],scope:{1:"keyword",
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
38 3:"title.function"},contains:[p]},{variants:[{
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
39 match:[/\bclass/,/\s+/,a,/\s*/,/\(\s*/,a,/\s*\)/]},{match:[/\bclass/,/\s+/,a]}],
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
40 scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
41 className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[m,p,o]}]}}})()
2db6253f355d [ThirdParty] Added highlight library for better readability on blog.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
42 ;export default hljsGrammar;