Skip to content

Commit

Permalink
Release v1.1.0
Browse files Browse the repository at this point in the history
Using GitHub Packages
v1.1.0
Upgrade package.json to 1.1.0
Package name fix
  • Loading branch information
dschach committed Jun 3, 2022
1 parent 5cafe0c commit 06b9ea5
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 389 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@highlightjs:registry=https://npm.pkg.github.com
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ For more details see [Highlight.js main page](https://github.com/highlightjs/hig
### Using directly from jsDelivr

```html
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.5.1/build/highlight.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release/build/highlight.min.js"></script>
<script
type="text/javascript"
src="https://cdn.jsdelivr.net/npm/highlightjs-apex/dist/apex.min.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions demo/testcode.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
}
for(Account a : [SELECT Id FROM Account WHERE Id = :a.Id ORDER BY CreatedDate ASC] ){}
actionPlan = (ActionPlan__c) stdController.getRecord();
truestory = ActionPlansUtilities.getCanDisplayReminder();
truestory = req.setHeader('X-Password', '{!$Credential.Password}');
}

/**
Expand All @@ -75,7 +75,7 @@
delete actionPlan;
} catch (DMLException e) {
ApexPages.addMessages(e);
return null;
return i++;
}

String retURL = '/' + ActionPlansUtilities.getObjectKeyPrefix(ActionPlansUtilities.namespacePrefix + 'ActionPlan__c') + '/o';
Expand Down
23 changes: 12 additions & 11 deletions dist/apex.es.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var hljsGrammar=(()=>{"use strict";return e=>{
const s=e.regex,t="[a-zA-Z][a-zA-Z_0-9]*",a={scope:"number",variants:[{
match:/\b[0-9]+(?:\.[0-9]+)?/},{match:/\s(?:[0-9,]+)?\.[0-9]+/}],relevance:0
},c={
match:s.either(/-/,/~/,/\*/,/\*=/,/\/=/,/%/,/\.\.\./,/\.\./,/\+/,/<</,/>>/,/>=/,/<=/,/\s<\s/,/\s>\s/,/\^/,/\^=/,/!=/,/!/,/==/,/&&/,/&/,/\|\|/,/\|/,/\?:/,/=/,/=>/),
match:s.either(/-/,/~/,/\*/,/\*=/,/\/=/,/%/,/\+/,/<</,/>>/,/>=/,/<=/,/\s<\s/,/\s>\s/,/\^/,/\^=/,/!=/,/!/,/==/,/&&/,/&/,/\|\|/,/\|/,/(?<=\s)\?|:(?=\s)/,/=/,/=>/,/\?\./),
scope:"operator",relevance:0},n={
match:[/\b/,s.either("ApexPages|10","AppLauncher","Approval","Auth","Cache","Canvas","ChatterAnswers|10","CommercePayments|10","ConnectApi|10","Database","Datacloud|10","DataSource|10","Dom","EventBus|10","Flow","Functions","KbManagement|10","Label","LxScheduler|10","Messaging","Metadata","Pref_center|10","Process","QuickAction","Reports","Schema","Search","Sfc|10","Sfdc_Checkout|10","sfdc_surveys|10","Site","Support","System","TerritoryMgmt|10","Test","Trigger|10","TxnSecurity|10","Type","UserProvisioning|10","VisualEditor|10","Wave|10"),/(?=\.)/],
scope:{2:"built_in"},relevance:10
Expand All @@ -24,7 +24,7 @@ scope:{2:"title.function.invoke"}},{
begin:[/\./,s.concat("(?:"+t+")"),/(?=\s*\([^\)])/],scope:{
2:"title.function.invoke"}},{
begin:[/(?<=\s)/,s.concat("(?:"+t+")"),/(?=\s*\()/],scope:{2:"title.function"}
}],contains:[r,o,e.APOS_STRING_MODE],relevance:0},d={
}],contains:[r,o,e.APOS_STRING_MODE],relevance:0},m={
begin:/\[[\s\n]*(?=SELECT)/,end:/\]/,scope:"subst",relevance:10,contains:[{
begin:s.concat(/\b/,s.either("ABOVE_OR_BELOW","ABOVE","ACTIVE","ADVANCED","ALL",/ALL\s+FIELDS/,"AND","ANY","ARRAY","AS","ASC","BY","CATEGORY","CONTAINS","COUNT","COUNT_DISTINCT","SUM","MAX","MIN","HOUR_IN_DAY","CONVERTCURRENCY","CUBE","DATA","DESC","DIVISION","END","EXCLUDES","FIELDS","FIND","FIRST","FOR","FROM",/GROUP\s+BY/,"HAVING","INCLUDES","LAST","LAST_90_DAYS","LAST_MONTH","LAST_N_DAYS","LAST_WEEK","LAST","LIKE","LIMIT","NETWORK","NEXT_90_DAYS","NEXT_MONTH","NEXT_N_DAYS","NEXT_WEEK","NULLS","OFFSET","ON","OR",/ORDER\s+BY/,"REFERENCE","RETURNING","ROLLUP","ROWS","SEARCH","SECURITY_ENFORCED","SELECT","SNIPPET","SORT","THIS_MONTH","THIS_WEEK","TODAY","TOLABEL","TOMORROW","TRACKING","TYPEOF","UPDATE",/USING\s+SCOPE/,"VIEW","VIEWSTAT","VIEWSTATE","WHERE","WITH","YESTERDAY","USER_MODE"),/\b/),
scope:"keyword"},{match:/(\bIN\b|<|<=|>|>=|\bNOT\s+IN\b|=|!\s*=|:{1})/,
Expand All @@ -33,17 +33,17 @@ relevance:0},{match:/\b[a-zA-Z][a-zA-Z_0-9]*\b/,scope:"property"},a,A],
illegal:"::"};return{name:"Apex",aliases:["apex","lightning"],
case_insensitive:!0,disableAutodetect:!1,ignoreIllegals:!1,keywords:{
$pattern:"[A-Za-z][0-9A-Za-z$_]*",
keyword:["abstract","AccessLevel","USER_MODE","break","catch","continue","default","do","else","execute","exports","extends|6","finally","finish","for","get","put","set","global","if","implements","new","newMap|10","old|10","oldMap|10","override","private","protected","public","return","start","static","throws","throw","testmethod|10","try","virtual","webservice","when","while"],
keyword:["trigger|10","class","interface","abstract","AccessLevel","USER_MODE","break","catch","continue","default","do","else","execute","exports","extends|6","finally","finish","for","get","put","set","global","if","implements","new","newMap|10","old|10","oldMap|10","override","private","protected","public","return","start","static","throws","throw","testmethod|10","try","virtual","webservice","when","while"],
"variable.language":["final","instanceof","super","this","transient"],
built_in:["trigger|10","class","interface","insert","update","upsert|8","delete","undelete","merge","schedulable|10","batchable|10","queueable|10","comparable|10","callable|10"],
built_in:["insert","update","upsert|8","delete","undelete","merge","schedulable|10","batchable|10","queueable|10","comparable|10","callable|10"],
type:["anytype","blob|0","boolean|0","byte|0","currency|0","date|0","datetime|0","decimal|0","double|0","enum|0","float|0","integer|0","long|0","object","pagereference|10","selectoption|10","short|0","sobject|10","string|0","time|0","void|0","float|0"],
literal:["false","true","null"]},
illegal:["</","<#","<]","<div>","\x3c!--","!DOCTYPE",/<iframe\b/,/\n#/,/\nimport \.[a-zA-Z]+\./,/\nimport [\w]+/,/\ninclude </,/\nuse\s+</,/\b(const|var)\s+\w+\s*=/,/\bstruct\b/,"System.log","console.log",/\bfor\s+\w+\s+IN\s+/,/\bif\s+\w+\s+IN\s+/,/\bend\s+if\b/,/\bend\s+select\b/,/\b(int|var)\s+\w+\s+=/,/\b(int[0-9]+|bool)\b/,/\b\$/,"::=",/\s#[a-zA-Z]/,/\s_[a-zA-Z]/,/\s\$[a-zA-Z]/,"#if","%if","%endif","#endif",/\w::\w/,/RETURNING\s+\*/,/\bint\b/,/import\s+\w+\s+=\s+require\("\w+"\)/,"/\binclude\b/",/\buse\s+strict\b/,/\w+\s+=\s+"\S*";/,/\/include\//,/\Anamespace\b/,/\bend\.\n/,'"""'],
illegal:["</","<#","<]","<div>","\x3c!--","!DOCTYPE",/<iframe\b/,/^#/,/^import \.[a-zA-Z]+\./,/^import [\w]+/,/^import$/,/^include </,/^use\s+</,/\b(const|var)\s+\w+\s*=/,/\bstruct\b/,"System.log","console.log",/\bfor\s+\w+\s+IN\s+/,/\bif\s+\w+\s+IN\s+/,/\bend\s+if\b/,/\bend\s+select\b/,/\b(int|var)\s+\w+\s+=/,/\b(int[0-9]+|bool)\b/,/\b\$/,"::=",/\s#[a-zA-Z]/,/\s_[a-zA-Z]/,/\s\$[a-zA-Z]/,"#if","%if",/\bif(?!\s+\()/,"%endif","#endif",/\w::\w/,/RETURNING\s+\*/,/\bint\b/,/import\s+\w+\s+=\s+require\("\w+"\)/,"/^include\b/",/\buse\s+strict\b/,/\w+\s+=\s+"\S*";/,/\/include\//,/\Anamespace\b/,/\bend\.\n/,/\bend\n/,'"""',/@\w+\[\w+\]/],
contains:[i,[{match:[/\b(?<=enum|\bnew)/,/\s+/,t,/\s*(?=[{()])/],scope:{3:"type"
},contains:[r,o,E]},{match:[/\bclass/,/\s+/,t],scope:{1:"keyword",
3:"title.class"}},{match:[/(?<=public)/,/\s+/,t,/(?=\s*\()/],scope:{
3:"constructor"}},{begin:[/\btrigger/,/\s+/,t,/\s+/,"on",/\s+/,t],end:"{",
scope:{1:"keyword",3:"title.class",7:"type"},contains:[r,o,{
},contains:[r,o,E]},{match:[/(?<=\bclass\b)/,/\s+/,t],scope:{3:"title.class"}},{
match:[/(?<=public)/,/\s+/,t,/(?=\s*\()/],scope:{3:"constructor"}},{
begin:[/(?<=\btrigger\b)/,/\s+/,t,/\s+/,"on",/\s+/,t],end:"{",scope:{
3:"title.class",7:"type"},contains:[r,o,{
match:/(?:before|after)\s+(?:insert|update|delete|undelete)/,scope:"built_in",
relevance:10}],relevance:10},{match:[/\bextends/,/\s+/,t],scope:{
3:"title.class.inherited"},contains:[r,o,n],illegal:[/\b_/,/_\b/]}],[{
Expand All @@ -57,6 +57,7 @@ relevance:8,scope:"keyword"},E,l,{variants:[{
match:[/\bfor\b/,/\s*\(/,/\w+/,/\s+/,/\w+/,/\s+:/,/(?=\s*\[)/],scope:{
1:"keyword",3:"type"}},{
match:[/\bfor\b/,/\s*\(/,/\w+/,/\s+/,/\w+/,/\s+:/,/\s*/,/\w+/],scope:{
1:"keyword",3:"type"}}],contains:[r,o,d]},e.APOS_STRING_MODE,A,n,a,c,{
match:/(?<!\.)\bId\b/,scope:"type",relevance:8},d]}}})()
1:"keyword",3:"type"}}],contains:[r,o,m]},e.APOS_STRING_MODE,A,{
begin:["{",/\$[a-zA-Z]+]/,".",/\w+/],end:"}",scope:{2:"built_in",4:"property"}
},n,a,c,{match:/(?<!\.)\bId\b/,scope:"type",relevance:8},m]}}})()
;export default hljsGrammar;
23 changes: 12 additions & 11 deletions dist/apex.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const s=e.regex,t="[a-zA-Z][a-zA-Z_0-9]*",a={scope:"number",variants:[{
match:/\b[0-9]+(?:\.[0-9]+)?/},{match:/\s(?:[0-9,]+)?\.[0-9]+/}],relevance:0
},c={
match:s.either(/-/,/~/,/\*/,/\*=/,/\/=/,/%/,/\.\.\./,/\.\./,/\+/,/<</,/>>/,/>=/,/<=/,/\s<\s/,/\s>\s/,/\^/,/\^=/,/!=/,/!/,/==/,/&&/,/&/,/\|\|/,/\|/,/\?:/,/=/,/=>/),
match:s.either(/-/,/~/,/\*/,/\*=/,/\/=/,/%/,/\+/,/<</,/>>/,/>=/,/<=/,/\s<\s/,/\s>\s/,/\^/,/\^=/,/!=/,/!/,/==/,/&&/,/&/,/\|\|/,/\|/,/(?<=\s)\?|:(?=\s)/,/=/,/=>/,/\?\./),
scope:"operator",relevance:0},n={
match:[/\b/,s.either("ApexPages|10","AppLauncher","Approval","Auth","Cache","Canvas","ChatterAnswers|10","CommercePayments|10","ConnectApi|10","Database","Datacloud|10","DataSource|10","Dom","EventBus|10","Flow","Functions","KbManagement|10","Label","LxScheduler|10","Messaging","Metadata","Pref_center|10","Process","QuickAction","Reports","Schema","Search","Sfc|10","Sfdc_Checkout|10","sfdc_surveys|10","Site","Support","System","TerritoryMgmt|10","Test","Trigger|10","TxnSecurity|10","Type","UserProvisioning|10","VisualEditor|10","Wave|10"),/(?=\.)/],
scope:{2:"built_in"},relevance:10
Expand All @@ -24,7 +24,7 @@ scope:{2:"title.function.invoke"}},{
begin:[/\./,s.concat("(?:"+t+")"),/(?=\s*\([^\)])/],scope:{
2:"title.function.invoke"}},{
begin:[/(?<=\s)/,s.concat("(?:"+t+")"),/(?=\s*\()/],scope:{2:"title.function"}
}],contains:[r,o,e.APOS_STRING_MODE],relevance:0},d={
}],contains:[r,o,e.APOS_STRING_MODE],relevance:0},u={
begin:/\[[\s\n]*(?=SELECT)/,end:/\]/,scope:"subst",relevance:10,contains:[{
begin:s.concat(/\b/,s.either("ABOVE_OR_BELOW","ABOVE","ACTIVE","ADVANCED","ALL",/ALL\s+FIELDS/,"AND","ANY","ARRAY","AS","ASC","BY","CATEGORY","CONTAINS","COUNT","COUNT_DISTINCT","SUM","MAX","MIN","HOUR_IN_DAY","CONVERTCURRENCY","CUBE","DATA","DESC","DIVISION","END","EXCLUDES","FIELDS","FIND","FIRST","FOR","FROM",/GROUP\s+BY/,"HAVING","INCLUDES","LAST","LAST_90_DAYS","LAST_MONTH","LAST_N_DAYS","LAST_WEEK","LAST","LIKE","LIMIT","NETWORK","NEXT_90_DAYS","NEXT_MONTH","NEXT_N_DAYS","NEXT_WEEK","NULLS","OFFSET","ON","OR",/ORDER\s+BY/,"REFERENCE","RETURNING","ROLLUP","ROWS","SEARCH","SECURITY_ENFORCED","SELECT","SNIPPET","SORT","THIS_MONTH","THIS_WEEK","TODAY","TOLABEL","TOMORROW","TRACKING","TYPEOF","UPDATE",/USING\s+SCOPE/,"VIEW","VIEWSTAT","VIEWSTATE","WHERE","WITH","YESTERDAY","USER_MODE"),/\b/),
scope:"keyword"},{match:/(\bIN\b|<|<=|>|>=|\bNOT\s+IN\b|=|!\s*=|:{1})/,
Expand All @@ -33,17 +33,17 @@ relevance:0},{match:/\b[a-zA-Z][a-zA-Z_0-9]*\b/,scope:"property"},a,A],
illegal:"::"};return{name:"Apex",aliases:["apex","lightning"],
case_insensitive:!0,disableAutodetect:!1,ignoreIllegals:!1,keywords:{
$pattern:"[A-Za-z][0-9A-Za-z$_]*",
keyword:["abstract","AccessLevel","USER_MODE","break","catch","continue","default","do","else","execute","exports","extends|6","finally","finish","for","get","put","set","global","if","implements","new","newMap|10","old|10","oldMap|10","override","private","protected","public","return","start","static","throws","throw","testmethod|10","try","virtual","webservice","when","while"],
keyword:["trigger|10","class","interface","abstract","AccessLevel","USER_MODE","break","catch","continue","default","do","else","execute","exports","extends|6","finally","finish","for","get","put","set","global","if","implements","new","newMap|10","old|10","oldMap|10","override","private","protected","public","return","start","static","throws","throw","testmethod|10","try","virtual","webservice","when","while"],
"variable.language":["final","instanceof","super","this","transient"],
built_in:["trigger|10","class","interface","insert","update","upsert|8","delete","undelete","merge","schedulable|10","batchable|10","queueable|10","comparable|10","callable|10"],
built_in:["insert","update","upsert|8","delete","undelete","merge","schedulable|10","batchable|10","queueable|10","comparable|10","callable|10"],
type:["anytype","blob|0","boolean|0","byte|0","currency|0","date|0","datetime|0","decimal|0","double|0","enum|0","float|0","integer|0","long|0","object","pagereference|10","selectoption|10","short|0","sobject|10","string|0","time|0","void|0","float|0"],
literal:["false","true","null"]},
illegal:["</","<#","<]","<div>","\x3c!--","!DOCTYPE",/<iframe\b/,/\n#/,/\nimport \.[a-zA-Z]+\./,/\nimport [\w]+/,/\ninclude </,/\nuse\s+</,/\b(const|var)\s+\w+\s*=/,/\bstruct\b/,"System.log","console.log",/\bfor\s+\w+\s+IN\s+/,/\bif\s+\w+\s+IN\s+/,/\bend\s+if\b/,/\bend\s+select\b/,/\b(int|var)\s+\w+\s+=/,/\b(int[0-9]+|bool)\b/,/\b\$/,"::=",/\s#[a-zA-Z]/,/\s_[a-zA-Z]/,/\s\$[a-zA-Z]/,"#if","%if","%endif","#endif",/\w::\w/,/RETURNING\s+\*/,/\bint\b/,/import\s+\w+\s+=\s+require\("\w+"\)/,"/\binclude\b/",/\buse\s+strict\b/,/\w+\s+=\s+"\S*";/,/\/include\//,/\Anamespace\b/,/\bend\.\n/,'"""'],
illegal:["</","<#","<]","<div>","\x3c!--","!DOCTYPE",/<iframe\b/,/^#/,/^import \.[a-zA-Z]+\./,/^import [\w]+/,/^import$/,/^include </,/^use\s+</,/\b(const|var)\s+\w+\s*=/,/\bstruct\b/,"System.log","console.log",/\bfor\s+\w+\s+IN\s+/,/\bif\s+\w+\s+IN\s+/,/\bend\s+if\b/,/\bend\s+select\b/,/\b(int|var)\s+\w+\s+=/,/\b(int[0-9]+|bool)\b/,/\b\$/,"::=",/\s#[a-zA-Z]/,/\s_[a-zA-Z]/,/\s\$[a-zA-Z]/,"#if","%if",/\bif(?!\s+\()/,"%endif","#endif",/\w::\w/,/RETURNING\s+\*/,/\bint\b/,/import\s+\w+\s+=\s+require\("\w+"\)/,"/^include\b/",/\buse\s+strict\b/,/\w+\s+=\s+"\S*";/,/\/include\//,/\Anamespace\b/,/\bend\.\n/,/\bend\n/,'"""',/@\w+\[\w+\]/],
contains:[i,[{match:[/\b(?<=enum|\bnew)/,/\s+/,t,/\s*(?=[{()])/],scope:{3:"type"
},contains:[r,o,E]},{match:[/\bclass/,/\s+/,t],scope:{1:"keyword",
3:"title.class"}},{match:[/(?<=public)/,/\s+/,t,/(?=\s*\()/],scope:{
3:"constructor"}},{begin:[/\btrigger/,/\s+/,t,/\s+/,"on",/\s+/,t],end:"{",
scope:{1:"keyword",3:"title.class",7:"type"},contains:[r,o,{
},contains:[r,o,E]},{match:[/(?<=\bclass\b)/,/\s+/,t],scope:{3:"title.class"}},{
match:[/(?<=public)/,/\s+/,t,/(?=\s*\()/],scope:{3:"constructor"}},{
begin:[/(?<=\btrigger\b)/,/\s+/,t,/\s+/,"on",/\s+/,t],end:"{",scope:{
3:"title.class",7:"type"},contains:[r,o,{
match:/(?:before|after)\s+(?:insert|update|delete|undelete)/,scope:"built_in",
relevance:10}],relevance:10},{match:[/\bextends/,/\s+/,t],scope:{
3:"title.class.inherited"},contains:[r,o,n],illegal:[/\b_/,/_\b/]}],[{
Expand All @@ -57,6 +57,7 @@ relevance:8,scope:"keyword"},E,l,{variants:[{
match:[/\bfor\b/,/\s*\(/,/\w+/,/\s+/,/\w+/,/\s+:/,/(?=\s*\[)/],scope:{
1:"keyword",3:"type"}},{
match:[/\bfor\b/,/\s*\(/,/\w+/,/\s+/,/\w+/,/\s+:/,/\s*/,/\w+/],scope:{
1:"keyword",3:"type"}}],contains:[r,o,d]},e.APOS_STRING_MODE,A,n,a,c,{
match:/(?<!\.)\bId\b/,scope:"type",relevance:8},d]}}})()
1:"keyword",3:"type"}}],contains:[r,o,u]},e.APOS_STRING_MODE,A,{
begin:["{",/\$[a-zA-Z]+]/,".",/\w+/],end:"}",scope:{2:"built_in",4:"property"}
},n,a,c,{match:/(?<!\.)\bId\b/,scope:"type",relevance:8},u]}}})()
;hljs.registerLanguage("apex",e)})();
Loading

0 comments on commit 06b9ea5

Please sign in to comment.