Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typos fix fuel #6759

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 64 additions & 15 deletions forc-plugins/forc-doc/src/static.files/highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,37 @@ const t=e[0],s=n.substr(e.index),i=b(v,e,s);if(!i)return ee;const a=v
;v.endScope&&v.endScope._wrap?(u(),
S.addKeyword(t,v.endScope._wrap)):v.endScope&&v.endScope._multi?(u(),
g(v.endScope,e)):a.skip?R+=t:(a.returnEnd||a.excludeEnd||(R+=t),
u(),a.excludeEnd&&(R=t));do{
v.scope&&S.closeNode(),v.skip||v.subLanguage||(M+=v.relevance),v=v.parent
}while(v!==i.parent);return i.starts&&h(i.starts,e),a.returnEnd?0:t.length}
let m={};function w(t,a){const o=a&&a[0];if(R+=t,null==o)return u(),0
;if("begin"===m.type&&"end"===a.type&&m.index===a.index&&""===o){
if(R+=n.slice(a.index,a.index+1),!r){const t=Error(`0 width match regex (${e})`)
;throw t.languageName=e,t.badRule=m.rule,t}return 1}
u();
if (a.excludeEnd) R = t;
do {
if (v.scope) S.closeNode();
if (!v.skip && !v.subLanguage) M += v.relevance;
v = v.parent;
} while (v !== i.parent);
if (i.starts) h(i.starts, e);
return a.returnEnd ? 0 : t.length;

let m = {};

function w(t, a) {
const o = a?.[0];
R += t;
if (!o) {
u();
return 0;
}
if (m.type === "begin" && a.type === "end" && m.index === a.index && o === "") {
R += n.slice(a.index, a.index + 1);
if (!r) {
const error = new Error(`0 width match regex (${e})`);
error.languageName = e;
error.badRule = m.rule;
throw error;
}
return 1;
}
}

if(m=a,"begin"===a.type)return(e=>{
const t=e[0],n=e.rule,i=new s(n),a=[n.__beforeBegin,n["on:begin"]]
;for(const n of a)if(n&&(n(e,i),i.isMatchIgnored))return p(t)
Expand Down Expand Up @@ -293,13 +317,38 @@ languageName:n})},unregisterLanguage:e=>{delete t[e]
listLanguages:()=>Object.keys(t),getLanguage:x,registerAliases:k,
autoDetection:v,inherit:Y,addPlugin:e=>{(e=>{
e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{
e["before:highlightBlock"](Object.assign({block:t.el},t))
}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{
e["after:highlightBlock"](Object.assign({block:t.el},t))})})(e),a.push(e)}
}),e.debugMode=()=>{r=!1},e.safeMode=()=>{r=!0
},e.versionString="11.3.1",e.regex={concat:b,lookahead:u,either:p,optional:h,
anyNumberOfTimes:g};for(const e in A)"object"==typeof A[e]&&n(A[e])
;return Object.assign(e,A),e})({}),ne=Object.freeze({__proto__:null,
e["before:highlightBlock"]({...t, block: t.el})

}), e["after:highlightBlock"] && !e["after:highlightElement"] &&
(e["after:highlightElement"] = t => {
e["after:highlightBlock"]({...t, block: t.el})
})

})(e), a = [...a, e]

}), e.debugMode = () => { r = false }

e.safeMode = () => { r = true }

e.versionString = "11.3.1"

e.regex = {
concat: b,
lookahead: u,
either: p,
optional: h,
anyNumberOfTimes: g
}

for (const e in A) {
if (typeof A[e] === "object") n(A[e])
}

Object.assign(e, A)

return e
})({}), ne = Object.freeze({__proto__: null})

grmr_sway:e=>{const t={className:"title.function.invoke",relevance:0,
begin:b(/\b/,/(?!let\b)/,e.IDENT_RE,u(/\s*\(/))},n="([u](8|16|32|64))?";return{
name:"Sway",aliases:["sw"],keywords:{$pattern:e.IDENT_RE+"!?",
Expand Down Expand Up @@ -389,4 +438,4 @@ beginKeywords:"true false null"
});const se=te;for(const e of Object.keys(ne)){
const t=e.replace("grmr_","").replace("_","-");se.registerLanguage(t,ne[e])}
return se}()
;"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs);
;"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs);
8 changes: 5 additions & 3 deletions scripts/prism/prism-sway.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ Prism.languages.sway = {
'operator': /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/
};

Prism.languages.sway['closure-params'].inside.rest = Prism.languages.sway;
Prism.languages.sway['attribute'].inside['string'] = Prism.languages.sway['string'];
import { languages } from 'Prism';

const closureParamsInsideRest = languages.sway['closure-params'].inside.rest = languages.sway;
const attributeInsideString = languages.sway['attribute'].inside['string'] = languages.sway['string'];
const finalAssignment = closureParamsInsideRest && attributeInsideString;

}(Prism));