├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── feature_request.md │ └── language-request.md ├── pull_request_template.md └── workflows │ ├── build.sh │ └── release.yml ├── .gitignore ├── .npmignore ├── .npmrc ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── assets └── screenshot.png ├── dist ├── common.d.ts ├── common.d.ts.map ├── common.js ├── detect.d.ts ├── detect.d.ts.map ├── detect.js ├── index.d.ts ├── index.d.ts.map ├── index.js ├── languages │ ├── asm.d.ts │ ├── asm.d.ts.map │ ├── asm.js │ ├── bash.d.ts │ ├── bash.d.ts.map │ ├── bash.js │ ├── bf.d.ts │ ├── bf.d.ts.map │ ├── bf.js │ ├── c.d.ts │ ├── c.d.ts.map │ ├── c.js │ ├── css.d.ts │ ├── css.d.ts.map │ ├── css.js │ ├── csv.d.ts │ ├── csv.d.ts.map │ ├── csv.js │ ├── diff.d.ts │ ├── diff.d.ts.map │ ├── diff.js │ ├── docker.d.ts │ ├── docker.d.ts.map │ ├── docker.js │ ├── git.d.ts │ ├── git.d.ts.map │ ├── git.js │ ├── go.d.ts │ ├── go.d.ts.map │ ├── go.js │ ├── html.d.ts │ ├── html.d.ts.map │ ├── html.js │ ├── http.d.ts │ ├── http.d.ts.map │ ├── http.js │ ├── ini.d.ts │ ├── ini.d.ts.map │ ├── ini.js │ ├── java.d.ts │ ├── java.d.ts.map │ ├── java.js │ ├── js.d.ts │ ├── js.d.ts.map │ ├── js.js │ ├── js_template_literals.d.ts │ ├── js_template_literals.d.ts.map │ ├── js_template_literals.js │ ├── jsdoc.d.ts │ ├── jsdoc.d.ts.map │ ├── jsdoc.js │ ├── json.d.ts │ ├── json.d.ts.map │ ├── json.js │ ├── leanpub-md.d.ts │ ├── leanpub-md.d.ts.map │ ├── leanpub-md.js │ ├── log.d.ts │ ├── log.d.ts.map │ ├── log.js │ ├── lua.d.ts │ ├── lua.d.ts.map │ ├── lua.js │ ├── make.d.ts │ ├── make.d.ts.map │ ├── make.js │ ├── md.d.ts │ ├── md.d.ts.map │ ├── md.js │ ├── pl.d.ts │ ├── pl.d.ts.map │ ├── pl.js │ ├── plain.d.ts │ ├── plain.d.ts.map │ ├── plain.js │ ├── py.d.ts │ ├── py.d.ts.map │ ├── py.js │ ├── regex.d.ts │ ├── regex.d.ts.map │ ├── regex.js │ ├── rs.d.ts │ ├── rs.d.ts.map │ ├── rs.js │ ├── sql.d.ts │ ├── sql.d.ts.map │ ├── sql.js │ ├── todo.d.ts │ ├── todo.d.ts.map │ ├── todo.js │ ├── toml.d.ts │ ├── toml.d.ts.map │ ├── toml.js │ ├── ts.d.ts │ ├── ts.d.ts.map │ ├── ts.js │ ├── uri.d.ts │ ├── uri.d.ts.map │ ├── uri.js │ ├── xml.d.ts │ ├── xml.d.ts.map │ ├── xml.js │ ├── yaml.d.ts │ ├── yaml.d.ts.map │ └── yaml.js ├── node │ ├── common.d.ts │ ├── common.d.ts.map │ ├── common.js │ ├── detect.d.ts │ ├── detect.d.ts.map │ ├── detect.js │ ├── index.d.ts │ ├── index.d.ts.map │ ├── index.js │ ├── languages │ │ ├── asm.d.ts │ │ ├── asm.d.ts.map │ │ ├── asm.js │ │ ├── bash.d.ts │ │ ├── bash.d.ts.map │ │ ├── bash.js │ │ ├── bf.d.ts │ │ ├── bf.d.ts.map │ │ ├── bf.js │ │ ├── c.d.ts │ │ ├── c.d.ts.map │ │ ├── c.js │ │ ├── css.d.ts │ │ ├── css.d.ts.map │ │ ├── css.js │ │ ├── csv.d.ts │ │ ├── csv.d.ts.map │ │ ├── csv.js │ │ ├── diff.d.ts │ │ ├── diff.d.ts.map │ │ ├── diff.js │ │ ├── docker.d.ts │ │ ├── docker.d.ts.map │ │ ├── docker.js │ │ ├── git.d.ts │ │ ├── git.d.ts.map │ │ ├── git.js │ │ ├── go.d.ts │ │ ├── go.d.ts.map │ │ ├── go.js │ │ ├── html.d.ts │ │ ├── html.d.ts.map │ │ ├── html.js │ │ ├── http.d.ts │ │ ├── http.d.ts.map │ │ ├── http.js │ │ ├── ini.d.ts │ │ ├── ini.d.ts.map │ │ ├── ini.js │ │ ├── java.d.ts │ │ ├── java.d.ts.map │ │ ├── java.js │ │ ├── js.d.ts │ │ ├── js.d.ts.map │ │ ├── js.js │ │ ├── js_template_literals.d.ts │ │ ├── js_template_literals.d.ts.map │ │ ├── js_template_literals.js │ │ ├── jsdoc.d.ts │ │ ├── jsdoc.d.ts.map │ │ ├── jsdoc.js │ │ ├── json.d.ts │ │ ├── json.d.ts.map │ │ ├── json.js │ │ ├── leanpub-md.d.ts │ │ ├── leanpub-md.d.ts.map │ │ ├── leanpub-md.js │ │ ├── log.d.ts │ │ ├── log.d.ts.map │ │ ├── log.js │ │ ├── lua.d.ts │ │ ├── lua.d.ts.map │ │ ├── lua.js │ │ ├── make.d.ts │ │ ├── make.d.ts.map │ │ ├── make.js │ │ ├── md.d.ts │ │ ├── md.d.ts.map │ │ ├── md.js │ │ ├── pl.d.ts │ │ ├── pl.d.ts.map │ │ ├── pl.js │ │ ├── plain.d.ts │ │ ├── plain.d.ts.map │ │ ├── plain.js │ │ ├── py.d.ts │ │ ├── py.d.ts.map │ │ ├── py.js │ │ ├── regex.d.ts │ │ ├── regex.d.ts.map │ │ ├── regex.js │ │ ├── rs.d.ts │ │ ├── rs.d.ts.map │ │ ├── rs.js │ │ ├── sql.d.ts │ │ ├── sql.d.ts.map │ │ ├── sql.js │ │ ├── todo.d.ts │ │ ├── todo.d.ts.map │ │ ├── todo.js │ │ ├── toml.d.ts │ │ ├── toml.d.ts.map │ │ ├── toml.js │ │ ├── ts.d.ts │ │ ├── ts.d.ts.map │ │ ├── ts.js │ │ ├── uri.d.ts │ │ ├── uri.d.ts.map │ │ ├── uri.js │ │ ├── xml.d.ts │ │ ├── xml.d.ts.map │ │ ├── xml.js │ │ ├── yaml.d.ts │ │ ├── yaml.d.ts.map │ │ └── yaml.js │ ├── package.json │ ├── terminal.d.ts │ ├── terminal.d.ts.map │ ├── terminal.js │ └── themes │ │ ├── atom-dark.d.ts │ │ ├── atom-dark.d.ts.map │ │ ├── atom-dark.js │ │ ├── default.d.ts │ │ ├── default.d.ts.map │ │ ├── default.js │ │ ├── termcolor.d.ts │ │ ├── termcolor.d.ts.map │ │ └── termcolor.js ├── terminal.d.ts ├── terminal.d.ts.map ├── terminal.js └── themes │ ├── atom-dark.css │ ├── atom-dark.d.ts │ ├── atom-dark.d.ts.map │ ├── atom-dark.js │ ├── dark.css │ ├── default.css │ ├── default.d.ts │ ├── default.d.ts.map │ ├── default.js │ ├── github-dark.css │ ├── github-dim.css │ ├── github-light.css │ ├── termcolor.d.ts │ ├── termcolor.d.ts.map │ ├── termcolor.js │ └── visual-studio-dark.css ├── docs ├── .nojekyll ├── assets │ ├── hierarchy.js │ ├── highlight.css │ ├── icons.js │ ├── icons.svg │ ├── main.js │ ├── navigation.js │ ├── search.js │ └── style.css ├── functions │ ├── detect.detectLanguage.html │ ├── index.highlightAll.html │ ├── index.highlightElement.html │ ├── index.highlightText.html │ ├── index.loadLanguage.html │ ├── index.tokenize.html │ ├── terminal.highlightText.html │ ├── terminal.printHighlight.html │ └── terminal.setTheme.html ├── hierarchy.html ├── index.html ├── interfaces │ └── index.ShjOptions.html ├── modules.html ├── modules │ ├── detect.html │ ├── index.html │ └── terminal.html └── types │ ├── index.ShjBrowserTheme.html │ ├── index.ShjDisplayMode.html │ ├── index.ShjLanguage.html │ ├── index.ShjLanguageComponent.html │ ├── index.ShjLanguageDefinition.html │ ├── index.ShjToken.html │ └── terminal.ShjTerminalTheme.html ├── examples ├── data.js ├── deno.js ├── index.html ├── languages │ ├── oneline.bash │ ├── oneline.http │ ├── screenshot.js │ ├── test.asm │ ├── test.bash │ ├── test.bf │ ├── test.c │ ├── test.css │ ├── test.csv │ ├── test.diff │ ├── test.docker │ ├── test.git │ ├── test.go │ ├── test.html │ ├── test.http │ ├── test.ini │ ├── test.java │ ├── test.js │ ├── test.jsdoc │ ├── test.json │ ├── test.leanpub-md │ ├── test.log │ ├── test.lua │ ├── test.make │ ├── test.md │ ├── test.pl │ ├── test.plain │ ├── test.py │ ├── test.regex │ ├── test.rs │ ├── test.sql │ ├── test.todo │ ├── test.toml │ ├── test.ts │ ├── test.uri │ ├── test.xml │ └── test.yaml ├── node-require │ ├── node.js │ ├── package-lock.json │ └── package.json ├── node-ts-module │ ├── .gitignore │ ├── package-lock.json │ ├── package.json │ ├── script.ts │ └── tsconfig.json ├── worker.html └── worker.js ├── package-lock.json ├── package.json ├── src ├── common.js ├── detect.js ├── index.js ├── languages │ ├── asm.js │ ├── bash.js │ ├── bf.js │ ├── c.js │ ├── css.js │ ├── csv.js │ ├── diff.js │ ├── docker.js │ ├── git.js │ ├── go.js │ ├── html.js │ ├── http.js │ ├── ini.js │ ├── java.js │ ├── js.js │ ├── js_template_literals.js │ ├── jsdoc.js │ ├── json.js │ ├── leanpub-md.js │ ├── log.js │ ├── lua.js │ ├── make.js │ ├── md.js │ ├── pl.js │ ├── plain.js │ ├── py.js │ ├── regex.js │ ├── rs.js │ ├── sql.js │ ├── todo.js │ ├── toml.js │ ├── ts.js │ ├── uri.js │ ├── xml.js │ └── yaml.js ├── terminal.js └── themes │ ├── atom-dark.css │ ├── atom-dark.js │ ├── dark.css │ ├── default.css │ ├── default.js │ ├── github-dark.css │ ├── github-dim.css │ ├── github-light.css │ ├── termcolor.js │ └── visual-studio-dark.css └── tsconfig.json /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a 🐛 report to help us improve 4 | title: "[BUG]" 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Information** 11 | * Speed-highlight.js version 12 | * Browser version 13 | 14 | **Description** 15 | A clear and concise description of what the bug is and how to reproduce it. If needed somes screenshots to help explain your problem. 16 | 17 | **Example** 18 | An example which reproduces the bug. This can be a link to a website, a [JSFiddle](https://jsfiddle.net/), an attached example project, etc. 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an 💡 for this project 4 | title: "[FEATURE]" 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/language-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Language request 3 | about: Suggest a new language 🌐 for this project 4 | title: "[LANGUAGE]" 5 | labels: new language 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Language** 11 | A description of the new language requested. 12 | 13 | **Resources** 14 | Ex. The official website, documentation or language specification. 15 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | # Changes 2 | * List of changes 3 | -------------------------------------------------------------------------------- /.github/workflows/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | npm i 6 | 7 | in_dir=./src 8 | out_dir=./dist 9 | 10 | esbuild_options="--bundle --minify" 11 | 12 | minify_js () { 13 | file=$1 14 | out=${file/${in_dir}/${out_dir}} 15 | out=${out/.ts/.js} 16 | mkdir -p $(dirname $out) 17 | npx esbuild $file $esbuild_options --format=esm --target=es2020 --outfile=$out 18 | 19 | node=${file/${in_dir}/"${out_dir}/node"} 20 | mkdir -p $(dirname $node) 21 | npx esbuild $file $esbuild_options --format=cjs --platform=node --target=node12 --outfile=$node 22 | } 23 | 24 | rm -rf $out_dir 25 | 26 | for file in $(find $in_dir \( -name "*.ts" -or -name "*.js" \) -type f); do 27 | minify_js $file & 28 | done 29 | 30 | minify_css () { 31 | file=$1 32 | 33 | out=${file/${in_dir}/${out_dir}} 34 | mkdir -p $(dirname $out) 35 | 36 | # need to run two times for rules to be properly merged together 37 | npx lightningcss --minify --bundle --targets '>= 2%' $file -o $out 38 | npx lightningcss --minify --bundle --targets '>= 2%' $out -o $out 39 | } 40 | 41 | for file in $(find $in_dir \( -name "*.css" \) -type f); do 42 | minify_css $file & 43 | done 44 | 45 | 46 | for pid in $(jobs -p); do 47 | wait $pid || (wait && echo -e "\n\033[91mError: could not minify some files\033[0m" && exit 1) 48 | done 49 | 50 | npx -p typescript tsc --outDir dist 51 | npx -p typescript tsc --outDir dist/node 52 | 53 | echo '{"type": "commonjs"}' > dist/node/package.json 54 | 55 | exit 0 56 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | permissions: 9 | contents: read # for checkout 10 | 11 | jobs: 12 | release: 13 | permissions: 14 | contents: write # to be able to publish a GitHub release 15 | issues: write # to be able to comment on released issues 16 | pull-requests: write # to be able to comment on released pull requests 17 | id-token: write # to enable use of OIDC for npm provenance 18 | 19 | name: release 20 | runs-on: ubuntu-latest 21 | steps: 22 | - name: Setup Repo 23 | uses: actions/checkout@v3 # v3 24 | 25 | - name: Setup Node 26 | uses: actions/setup-node@v3 # v3 27 | with: 28 | cache: npm 29 | node-version: lts/* 30 | 31 | - run: npm clean-install 32 | - run: npm audit signatures 33 | - run: npm run build 34 | 35 | - name: Build documention 36 | run: npx -y typedoc src/index.js src/detect.js src/terminal.js 37 | 38 | - name: Auto commit 39 | run: | 40 | git add . 41 | git -c user.name='minify-bot' -c user.email='speed-highlight@protonmail.com' commit -m "Auto minify" || exit 0 42 | git push 43 | env: 44 | github-token: ${{ secrets.GITHUB_TOKEN }} 45 | 46 | - name: Release 47 | run: npx semantic-release 48 | env: 49 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 50 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .github 2 | assets 3 | package 4 | esbuild-* 5 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | speed_highlight:registry=https://npm.pkg.github.com 2 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Welcome :wave: 2 | 3 | If you are considering contributing to Speed Highlight JS this document is for you 4 | 5 | Contributions are greatly appreciated 6 | 7 | There are many ways to contribute (you do not have to be a programmer): 8 | 9 | * Report [issues or bugs](https://github.com/matubu/speed_highlight_js/issues) :bug:, join the existing discussion on open issues 10 | * Submit [pull requests](https://github.com/matubu/speed_highlight_js/pulls) 11 | * Write plugins 12 | * Create [language definitions](https://github.com/matubu/speed_highlight_js/wiki/Create-suggest-new-languages) :globe_with_meridians: 13 | * Design [themes](https://github.com/matubu/speed_highlight_js/wiki/Create-new-themes-styles) :rainbow: 14 | * Improve our [documentation](https://github.com/matubu/speed_highlight_js/wiki) :bookmark_tabs: 15 | 16 | # Prerequisites :books: 17 | 18 | * To help answer questions on issues or contribute you only need to be friendly 19 | * To contribute to language definitions knowing Regular Expressions is really helpful 20 | * To work on the core you'll need to know a bit JavaScript 21 | * To work on documentation you'll need motivation 22 | * :bulb: Knowing well the language that you highlight can help you out a lot 23 | 24 | # Requesting Features :page_with_curl: 25 | 26 | Feature requests are always welcome 27 | 28 | If you wish we supported a language we don't, you can read [this](https://github.com/matubu/speed_highlight_js/wiki/Create-suggest-new-languages) 29 | 30 | If you find a bug or think of an improvement, feel free to open an issue 31 | 32 | # Fixing Issues (PRs) :construction_worker_man: 33 | 34 | If you feel comfortable with the prerequisites, you can grab any issue preferably marked as "good first issue" 35 | -------------------------------------------------------------------------------- /assets/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/speed-highlight/core/63c99bf89501ecf2f270cb4987930a06bf631d50/assets/screenshot.png -------------------------------------------------------------------------------- /dist/common.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace _default { 2 | namespace num { 3 | let type: string; 4 | let match: RegExp; 5 | } 6 | namespace str { 7 | let type_1: string; 8 | export { type_1 as type }; 9 | let match_1: RegExp; 10 | export { match_1 as match }; 11 | } 12 | namespace strDouble { 13 | let type_2: string; 14 | export { type_2 as type }; 15 | let match_2: RegExp; 16 | export { match_2 as match }; 17 | } 18 | } 19 | export default _default; 20 | //# sourceMappingURL=common.d.ts.map -------------------------------------------------------------------------------- /dist/common.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/common.js: -------------------------------------------------------------------------------- 1 | var t={num:{type:"num",match:/(\.e?|\b)\d(e-|[\d.oxa-fA-F_])*(\.|\b)/g},str:{type:"str",match:/(["'])(\\[^]|(?!\1)[^\r\n\\])*\1?/g},strDouble:{type:"str",match:/"((?!")[^\r\n\\]|\\[^])*"?/g}};export{t as default}; 2 | -------------------------------------------------------------------------------- /dist/detect.d.ts: -------------------------------------------------------------------------------- 1 | export function detectLanguage(code: string): ShjLanguage; 2 | export type ShjLanguage = import("./index.js").ShjLanguage; 3 | //# sourceMappingURL=detect.d.ts.map -------------------------------------------------------------------------------- /dist/detect.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../src/detect.js"],"names":[],"mappings":"AA8CO,qCAHI,MAAM,GACJ,WAAW,CAUvB;0BAhDY,OAAO,YAAY,EAAE,WAAW"} -------------------------------------------------------------------------------- /dist/detect.js: -------------------------------------------------------------------------------- 1 | var g=[["bash",[/#!(\/usr)?\/bin\/bash/g,500],[/\b(if|elif|then|fi|echo)\b|\$/g,10]],["html",[/<\/?[a-z-]+[^\n>]*>/g,10],[/^\s+<-]/gm,10],[/^@@ ?[-+,0-9 ]+ ?@@/gm,25]],["md",[/^(>|\t\*|\t\d+.)/gm,10],[/\[.*\](.*)/g,10]],["docker",[/^(FROM|ENTRYPOINT|RUN)/gm,500]],["xml",[/<\/?[a-z-]+[^\n>]*>/g,10],[/^<\?xml/g,500]],["c",[/#include\b|\bprintf\s+\(/g,100]],["rs",[/^\s+(use|fn|mut|match)\b/gm,100]],["go",[/\b(func|fmt|package)\b/g,100]],["java",[/^import\s+java/gm,500]],["asm",[/^(section|global main|extern|\t(call|mov|ret))/gm,100]],["css",[/^(@import|@page|@media|(\.|#)[a-z]+)/gm,20]],["json",[/\b(true|false|null|\{})\b|\"[^"]+\":/g,10]],["yaml",[/^(\s+)?[a-z][a-z0-9]*:/gmi,10]]],m=e=>g.map(([t,...a])=>[t,a.reduce((s,[n,i])=>s+[...e.matchAll(n)].length*i,0)]).filter(([t,a])=>a>20).sort((t,a)=>a[1]-t[1])[0]?.[0]||"plain";export{m as detectLanguage}; 2 | -------------------------------------------------------------------------------- /dist/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":"AAgDA;;;;;;;;;;GAUG;AACH,8BAPW,MAAM,QACN,WAAW,QAAM,SACjB,CAAS,IAAM,EAAN,MAAM,EAAE,IAAS,EAAT,QAAQ,YAAC,KAAE,IAAI,iBAyD1C;AAED;;;;;;;;;;;;GAYG;AACH,mCANW,MAAM,QACN,WAAW,6BAEX,UAAU,GACR,OAAO,CAAC,MAAM,CAAC,CAS3B;AAED;;;;;;;;;GASG;AACH,sCALW,OAAO,SACP,WAAW,SACX,cAAc,QACd,UAAU,iBAQpB;AASM,mCAFI,UAAU,mBAK2C;AAoBzD,2CAHI,MAAM,YACN;IAAE,OAAO,EAAE,qBAAqB,CAAA;CAAE,QAI5C;;;;0BAlLY,CAAC,KAAK,GAAC,MAAM,GAAC,IAAI,GAAC,GAAG,GAAC,KAAK,GAAC,KAAK,GAAC,MAAM,GAAC,QAAQ,GAAC,KAAK,GAAC,IAAI,GAAC,MAAM,GAAC,MAAM,GAAC,KAAK,GAAC,MAAM,GAAC,IAAI,GAAC,OAAO,GAAC,MAAM,GAAC,YAAY,GAAC,KAAK,GAAC,KAAK,GAAC,MAAM,GAAC,IAAI,GAAC,IAAI,GAAC,OAAO,GAAC,IAAI,GAAC,OAAO,GAAC,IAAI,GAAC,KAAK,GAAC,MAAM,GAAC,MAAM,GAAC,IAAI,GAAC,KAAK,GAAC,KAAK,GAAC,MAAM,CAAC;;;;8BAK7N,CAAC,WAAW,GAAC,aAAa,GAAC,YAAY,GAAC,MAAM,GAAC,SAAS,GAAC,cAAc,GAAC,oBAAoB,CAAC;;;;;;;;;;;;6BAS7F,CAAC,QAAQ,GAAC,SAAS,GAAC,WAAW,CAAC;;;;uBAQhC,CAAC,SAAS,GAAC,KAAK,GAAC,KAAK,GAAC,SAAS,GAAC,KAAK,GAAC,OAAO,GAAC,MAAM,GAAC,QAAQ,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,KAAK,GAAC,MAAM,GAAC,KAAK,GAAC,KAAK,CAAC;mCAyI7G;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACrC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,GAAG,qBAAqB,IAAG,CAAC,IAAI,EAAC,MAAM,KAAK,oBAAoB,CAAA,CAAA;CAAE,GAC9F;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;oCAKZ,oBAAoB,EAAE"} -------------------------------------------------------------------------------- /dist/languages/asm.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | type: string; 3 | match: RegExp; 4 | expand?: undefined; 5 | sub?: undefined; 6 | } | { 7 | expand: string; 8 | type?: undefined; 9 | match?: undefined; 10 | sub?: undefined; 11 | } | { 12 | type: string; 13 | match: RegExp; 14 | sub: { 15 | type: string; 16 | match: RegExp; 17 | }[]; 18 | expand?: undefined; 19 | })[]; 20 | export default _default; 21 | //# sourceMappingURL=asm.d.ts.map -------------------------------------------------------------------------------- /dist/languages/asm.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"asm.d.ts","sourceRoot":"","sources":["../../src/languages/asm.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/asm.js: -------------------------------------------------------------------------------- 1 | var t=[{type:"cmnt",match:/(;|#).*/gm},{expand:"str"},{expand:"num"},{type:"num",match:/\$[\da-fA-F]*\b/g},{type:"kwd",match:/^[a-z]+\s+[a-z.]+\b/gm,sub:[{type:"func",match:/^[a-z]+/g}]},{type:"kwd",match:/^\t*[a-z][a-z\d]*\b/gm},{match:/%|\$/g,type:"oper"}];export{t as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/bash.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | type: string; 3 | match: RegExp; 4 | } | { 5 | sub: string; 6 | match: RegExp; 7 | expand?: undefined; 8 | } | { 9 | expand: string; 10 | sub?: undefined; 11 | match?: undefined; 12 | })[]; 13 | export default _default; 14 | //# sourceMappingURL=bash.d.ts.map -------------------------------------------------------------------------------- /dist/languages/bash.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"bash.d.ts","sourceRoot":"","sources":["../../src/languages/bash.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/bash.js: -------------------------------------------------------------------------------- 1 | var e={type:"var",match:/\$\w+|\${[^}]*}|\$\([^)]*\)/g},t=[{sub:"todo",match:/#.*/g},{type:"str",match:/(["'])((?!\1)[^\r\n\\]|\\[^])*\1?/g,sub:[e]},{type:"oper",match:/(?<=\s|^)\.*\/[a-z/_.-]+/gi},{type:"kwd",match:/\s-[a-zA-Z]+|$<|[&|;]+|\b(unset|readonly|shift|export|if|fi|else|elif|while|do|done|for|until|case|esac|break|continue|exit|return|trap|wait|eval|exec|then|declare|enable|local|select|typeset|time|add|remove|install|update|delete)(?=\s|$)/g},{expand:"num"},{type:"func",match:/(?<=(^|\||\&\&|\;)\s*)[a-z_.-]+(?=\s|$)/gmi},{type:"bool",match:/(?<=\s|^)(true|false)(?=\s|$)/g},{type:"oper",match:/[=(){}<>!]+/g},{type:"var",match:/(?<=\s|^)[\w_]+(?=\s*=)/g},e];export{t as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/bf.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | type?: undefined; 5 | } | { 6 | type: string; 7 | match: RegExp; 8 | sub?: undefined; 9 | })[]; 10 | export default _default; 11 | //# sourceMappingURL=bf.d.ts.map -------------------------------------------------------------------------------- /dist/languages/bf.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"bf.d.ts","sourceRoot":"","sources":["../../src/languages/bf.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/bf.js: -------------------------------------------------------------------------------- 1 | var t=[{match:/[^\[\->+.<\]\s].*/g,sub:"todo"},{type:"func",match:/\.+/g},{type:"kwd",match:/[<>]+/g},{type:"oper",match:/[+-]+/g}];export{t as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/c.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | expand?: undefined; 5 | type?: undefined; 6 | } | { 7 | expand: string; 8 | match?: undefined; 9 | sub?: undefined; 10 | type?: undefined; 11 | } | { 12 | type: string; 13 | match: RegExp; 14 | sub: { 15 | type: string; 16 | match: RegExp; 17 | }[]; 18 | expand?: undefined; 19 | } | { 20 | match: RegExp; 21 | sub: ({ 22 | type: string; 23 | match: RegExp; 24 | sub?: undefined; 25 | } | { 26 | match: RegExp; 27 | sub: string; 28 | type?: undefined; 29 | })[]; 30 | expand?: undefined; 31 | type?: undefined; 32 | } | { 33 | type: string; 34 | match: RegExp; 35 | sub?: undefined; 36 | expand?: undefined; 37 | })[]; 38 | export default _default; 39 | //# sourceMappingURL=c.d.ts.map -------------------------------------------------------------------------------- /dist/languages/c.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"c.d.ts","sourceRoot":"","sources":["../../src/languages/c.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/c.js: -------------------------------------------------------------------------------- 1 | var t=[{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:"todo"},{expand:"str"},{expand:"num"},{type:"kwd",match:/#\s*include (<.*>|".*")/g,sub:[{type:"str",match:/(<|").*/g}]},{match:/asm\s*{[^}]*}/g,sub:[{type:"kwd",match:/^asm/g},{match:/[^{}]*(?=}$)/g,sub:"asm"}]},{type:"kwd",match:/\*|&|#[a-z]+\b|\b(asm|auto|double|int|struct|break|else|long|switch|case|enum|register|typedef|char|extern|return|union|const|float|short|unsigned|continue|for|signed|void|default|goto|sizeof|volatile|do|if|static|while)\b/g},{type:"oper",match:/[/*+:?&|%^~=!,<>.^-]+/g},{type:"func",match:/[a-zA-Z_][\w_]*(?=\s*\()/g},{type:"class",match:/\b[A-Z][\w_]*\b/g}];export{t as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/css.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | expand?: undefined; 5 | type?: undefined; 6 | } | { 7 | expand: string; 8 | match?: undefined; 9 | sub?: undefined; 10 | type?: undefined; 11 | } | { 12 | type: string; 13 | match: RegExp; 14 | sub?: undefined; 15 | expand?: undefined; 16 | } | { 17 | type: string; 18 | match: RegExp; 19 | sub: { 20 | type: string; 21 | match: RegExp; 22 | }[]; 23 | expand?: undefined; 24 | } | { 25 | match: RegExp; 26 | sub: { 27 | type: string; 28 | match: RegExp; 29 | }[]; 30 | expand?: undefined; 31 | type?: undefined; 32 | })[]; 33 | export default _default; 34 | //# sourceMappingURL=css.d.ts.map -------------------------------------------------------------------------------- /dist/languages/css.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../src/languages/css.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/css.js: -------------------------------------------------------------------------------- 1 | var t=[{match:/\/\*((?!\*\/)[^])*(\*\/)?/g,sub:"todo"},{expand:"str"},{type:"kwd",match:/@\w+\b|\b(and|not|only|or)\b|\b[a-z-]+(?=[^{}]*{)/g},{type:"var",match:/\b[\w-]+(?=\s*:)|(::?|\.)[\w-]+(?=[^{}]*{)/g},{type:"func",match:/#[\w-]+(?=[^{}]*{)/g},{type:"num",match:/#[\da-f]{3,8}/g},{type:"num",match:/\d+(\.\d+)?(cm|mm|in|px|pt|pc|em|ex|ch|rem|vm|vh|vmin|vmax|%)?/g,sub:[{type:"var",match:/[a-z]+|%/g}]},{match:/url\([^)]*\)/g,sub:[{type:"func",match:/url(?=\()/g},{type:"str",match:/[^()]+/g}]},{type:"func",match:/\b[a-zA-Z]\w*(?=\s*\()/g},{type:"num",match:/\b[a-z-]+\b/g}];export{t as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/csv.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | expand: string; 3 | type?: undefined; 4 | match?: undefined; 5 | } | { 6 | type: string; 7 | match: RegExp; 8 | expand?: undefined; 9 | })[]; 10 | export default _default; 11 | //# sourceMappingURL=csv.d.ts.map -------------------------------------------------------------------------------- /dist/languages/csv.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"csv.d.ts","sourceRoot":"","sources":["../../src/languages/csv.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/csv.js: -------------------------------------------------------------------------------- 1 | var e=[{expand:"strDouble"},{type:"oper",match:/,/g}];export{e as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/diff.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: { 2 | type: string; 3 | match: RegExp; 4 | }[]; 5 | export default _default; 6 | //# sourceMappingURL=diff.d.ts.map -------------------------------------------------------------------------------- /dist/languages/diff.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../src/languages/diff.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/diff.js: -------------------------------------------------------------------------------- 1 | var t=[{type:"deleted",match:/^[-<].*/gm},{type:"insert",match:/^[+>].*/gm},{type:"kwd",match:/!.*/gm},{type:"section",match:/^@@.*@@$|^\d.*|^([*-+])\1\1.*/gm}];export{t as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/docker.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | type: string; 3 | match: RegExp; 4 | } | { 5 | sub: string; 6 | match: RegExp; 7 | expand?: undefined; 8 | } | { 9 | expand: string; 10 | sub?: undefined; 11 | match?: undefined; 12 | })[]; 13 | export default _default; 14 | //# sourceMappingURL=docker.d.ts.map -------------------------------------------------------------------------------- /dist/languages/docker.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../../src/languages/docker.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/docker.js: -------------------------------------------------------------------------------- 1 | var e={type:"var",match:/\$\w+|\${[^}]*}|\$\([^)]*\)/g},t=[{sub:"todo",match:/#.*/g},{type:"str",match:/(["'])((?!\1)[^\r\n\\]|\\[^])*\1?/g,sub:[e]},{type:"oper",match:/(?<=\s|^)\.*\/[a-z/_.-]+/gi},{type:"kwd",match:/\s-[a-zA-Z]+|$<|[&|;]+|\b(unset|readonly|shift|export|if|fi|else|elif|while|do|done|for|until|case|esac|break|continue|exit|return|trap|wait|eval|exec|then|declare|enable|local|select|typeset|time|add|remove|install|update|delete)(?=\s|$)/g},{expand:"num"},{type:"func",match:/(?<=(^|\||\&\&|\;)\s*)[a-z_.-]+(?=\s|$)/gmi},{type:"bool",match:/(?<=\s|^)(true|false)(?=\s|$)/g},{type:"oper",match:/[=(){}<>!]+/g},{type:"var",match:/(?<=\s|^)[\w_]+(?=\s*=)/g},e];var r=[{type:"kwd",match:/^(FROM|RUN|CMD|LABEL|MAINTAINER|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ARG|ONBUILD|STOPSIGNAL|HEALTHCHECK|SHELL)\b/gmi},...t];export{r as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/git.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | type: string; 3 | match: RegExp; 4 | } | { 5 | match: RegExp; 6 | sub: string; 7 | expand?: undefined; 8 | } | { 9 | expand: string; 10 | match?: undefined; 11 | sub?: undefined; 12 | })[]; 13 | export default _default; 14 | //# sourceMappingURL=git.d.ts.map -------------------------------------------------------------------------------- /dist/languages/git.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/languages/git.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/git.js: -------------------------------------------------------------------------------- 1 | var t=[{type:"deleted",match:/^[-<].*/gm},{type:"insert",match:/^[+>].*/gm},{type:"kwd",match:/!.*/gm},{type:"section",match:/^@@.*@@$|^\d.*|^([*-+])\1\1.*/gm}];var a=[{match:/^#.*/gm,sub:"todo"},{expand:"str"},...t,{type:"func",match:/^(\$ )?git(\s.*)?$/gm},{type:"kwd",match:/^commit \w+$/gm}];export{a as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/go.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | expand?: undefined; 5 | type?: undefined; 6 | } | { 7 | expand: string; 8 | match?: undefined; 9 | sub?: undefined; 10 | type?: undefined; 11 | } | { 12 | type: string; 13 | match: RegExp; 14 | sub?: undefined; 15 | expand?: undefined; 16 | })[]; 17 | export default _default; 18 | //# sourceMappingURL=go.d.ts.map -------------------------------------------------------------------------------- /dist/languages/go.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"go.d.ts","sourceRoot":"","sources":["../../src/languages/go.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/go.js: -------------------------------------------------------------------------------- 1 | var t=[{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:"todo"},{expand:"str"},{expand:"num"},{type:"kwd",match:/\*|&|\b(break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go|goto|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/g},{type:"func",match:/[a-zA-Z_][\w_]*(?=\s*\()/g},{type:"class",match:/\b[A-Z][\w_]*\b/g},{type:"oper",match:/[+\-*\/%&|^~=!<>.^-]+/g}];export{t as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/html.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: ({ 4 | type: string; 5 | match: RegExp; 6 | sub: { 7 | type: string; 8 | match: RegExp; 9 | }[]; 10 | } | { 11 | type: string; 12 | match: RegExp; 13 | sub?: undefined; 14 | })[]; 15 | } | { 16 | match: RegExp; 17 | sub: string; 18 | type?: undefined; 19 | } | { 20 | type: string; 21 | match: RegExp; 22 | sub?: undefined; 23 | } | { 24 | match: RegExp; 25 | sub: ({ 26 | match: RegExp; 27 | sub: ({ 28 | type: string; 29 | match: RegExp; 30 | sub: { 31 | type: string; 32 | match: RegExp; 33 | }[]; 34 | } | { 35 | type: string; 36 | match: RegExp; 37 | sub?: undefined; 38 | })[]; 39 | } | { 40 | match: RegExp; 41 | sub: string; 42 | })[]; 43 | })[]; 44 | export default _default; 45 | //# sourceMappingURL=html.d.ts.map -------------------------------------------------------------------------------- /dist/languages/html.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../src/languages/html.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/html.js: -------------------------------------------------------------------------------- 1 | var p=":A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD",a=p+"\\-\\.0-9\xB7\u0300-\u036F\u203F-\u2040",e=`[${p}][${a}]*`,s=`\\s*(\\s+${e}\\s*(=\\s*([^"']\\S*|("|')(\\\\[^]|(?!\\4)[^])*\\4?)?)?\\s*)*`,t={match:RegExp(`<[/!?]?${e}${s}[/!?]?>`,"g"),sub:[{type:"var",match:RegExp(`^<[/!?]?${e}`,"g"),sub:[{type:"oper",match:/^<[\/!?]?/g}]},{type:"str",match:/=\s*([^"']\S*|("|')(\\[^]|(?!\2)[^])*\2?)/g,sub:[{type:"oper",match:/^=/g}]},{type:"oper",match:/[\/!?]?>/g},{type:"class",match:RegExp(e,"g")}]},u=[{match:/)[^])*-->/g,sub:"todo"},{type:"class",match://gi},t,{type:"str",match:RegExp(`<\\?${e}([^?]|\\?[^?>])*\\?+>`,"g"),sub:[{type:"var",match:RegExp(`^<\\?${e}`,"g"),sub:[{type:"oper",match:/^<\?/g}]},{type:"oper",match:/\?+>$/g}]},{type:"var",match:/&(#x?)?[\da-z]{1,8};/gi}];var g=[{type:"class",match:/])*>/gi,sub:[{type:"str",match:/"[^"]*"|'[^']*'/g},{type:"oper",match:/^$/g},{type:"var",match:/DOCTYPE/gi}]},{match:RegExp(`((?!)[^])*`,"g"),sub:[{match:RegExp(`^`,"g"),sub:t.sub},{match:RegExp(`${t.match}|[^]*(?=$)`,"g"),sub:"css"},t]},{match:RegExp(`((?!<\/script>)[^])*<\/script\\s*>`,"g"),sub:[{match:RegExp(`^`,"g"),sub:t.sub},{match:RegExp(`${t.match}|[^]*(?=<\/script\\s*>$)`,"g"),sub:"js"},t]},...u];export{g as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/http.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | type: string; 3 | match: RegExp; 4 | expand?: undefined; 5 | sub?: undefined; 6 | } | { 7 | expand: string; 8 | type?: undefined; 9 | match?: undefined; 10 | sub?: undefined; 11 | } | { 12 | match: RegExp; 13 | sub: (code: string) => ShjLanguage; 14 | type?: undefined; 15 | expand?: undefined; 16 | })[]; 17 | export default _default; 18 | //# sourceMappingURL=http.d.ts.map -------------------------------------------------------------------------------- /dist/languages/http.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/languages/http.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/http.js: -------------------------------------------------------------------------------- 1 | var i=[["bash",[/#!(\/usr)?\/bin\/bash/g,500],[/\b(if|elif|then|fi|echo)\b|\$/g,10]],["html",[/<\/?[a-z-]+[^\n>]*>/g,10],[/^\s+<-]/gm,10],[/^@@ ?[-+,0-9 ]+ ?@@/gm,25]],["md",[/^(>|\t\*|\t\d+.)/gm,10],[/\[.*\](.*)/g,10]],["docker",[/^(FROM|ENTRYPOINT|RUN)/gm,500]],["xml",[/<\/?[a-z-]+[^\n>]*>/g,10],[/^<\?xml/g,500]],["c",[/#include\b|\bprintf\s+\(/g,100]],["rs",[/^\s+(use|fn|mut|match)\b/gm,100]],["go",[/\b(func|fmt|package)\b/g,100]],["java",[/^import\s+java/gm,500]],["asm",[/^(section|global main|extern|\t(call|mov|ret))/gm,100]],["css",[/^(@import|@page|@media|(\.|#)[a-z]+)/gm,20]],["json",[/\b(true|false|null|\{})\b|\"[^"]+\":/g,10]],["yaml",[/^(\s+)?[a-z][a-z0-9]*:/gmi,10]]],e=n=>i.map(([a,...t])=>[a,t.reduce((m,[s,g])=>m+[...n.matchAll(s)].length*g,0)]).filter(([a,t])=>t>20).sort((a,t)=>t[1]-a[1])[0]?.[0]||"plain";var o=[{type:"kwd",match:/^(GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH|PRI|SEARCH)\b/gm},{expand:"str"},{type:"section",match:/\bHTTP\/[\d.]+\b/g},{expand:"num"},{type:"oper",match:/[,;:=]/g},{type:"var",match:/[a-zA-Z][\w-]*(?=:)/g},{match:/\n\n[^]*/g,sub:e}];export{o as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/ini.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | type?: undefined; 5 | } | { 6 | type: string; 7 | match: RegExp; 8 | sub?: undefined; 9 | })[]; 10 | export default _default; 11 | //# sourceMappingURL=ini.d.ts.map -------------------------------------------------------------------------------- /dist/languages/ini.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"ini.d.ts","sourceRoot":"","sources":["../../src/languages/ini.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/ini.js: -------------------------------------------------------------------------------- 1 | var t=[{match:/(^[ \f\t\v]*)[#;].*/gm,sub:"todo"},{type:"str",match:/.*/g},{type:"var",match:/.*(?==)/g},{type:"section",match:/^\s*\[.+\]\s*$/gm},{type:"oper",match:/=/g}];export{t as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/java.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | expand?: undefined; 5 | type?: undefined; 6 | } | { 7 | expand: string; 8 | match?: undefined; 9 | sub?: undefined; 10 | type?: undefined; 11 | } | { 12 | type: string; 13 | match: RegExp; 14 | sub?: undefined; 15 | expand?: undefined; 16 | })[]; 17 | export default _default; 18 | //# sourceMappingURL=java.d.ts.map -------------------------------------------------------------------------------- /dist/languages/java.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"java.d.ts","sourceRoot":"","sources":["../../src/languages/java.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/java.js: -------------------------------------------------------------------------------- 1 | var t=[{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:"todo"},{expand:"str"},{expand:"num"},{type:"kwd",match:/\b(abstract|assert|boolean|break|byte|case|catch|char|class|continue|const|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|package|private|protected|public|requires|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|transient|try|var|void|volatile|while)\b/g},{type:"oper",match:/[/*+:?&|%^~=!,<>.^-]+/g},{type:"func",match:/[a-zA-Z_][\w_]*(?=\s*\()/g},{type:"class",match:/\b[A-Z][\w_]*\b/g}];export{t as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/js.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | expand?: undefined; 5 | type?: undefined; 6 | } | { 7 | expand: string; 8 | match?: undefined; 9 | sub?: undefined; 10 | type?: undefined; 11 | } | { 12 | type: string; 13 | match: RegExp; 14 | sub?: undefined; 15 | expand?: undefined; 16 | })[]; 17 | export default _default; 18 | //# sourceMappingURL=js.d.ts.map -------------------------------------------------------------------------------- /dist/languages/js.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"js.d.ts","sourceRoot":"","sources":["../../src/languages/js.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/js.js: -------------------------------------------------------------------------------- 1 | var t=[{match:/\/\*\*((?!\*\/)[^])*(\*\/)?/g,sub:"jsdoc"},{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:"todo"},{expand:"str"},{match:/`((?!`)[^]|\\[^])*`?/g,sub:"js_template_literals"},{type:"kwd",match:/=>|\b(this|set|get|as|async|await|break|case|catch|class|const|constructor|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|if|implements|import|in|instanceof|interface|let|var|of|new|package|private|protected|public|return|static|super|switch|throw|throws|try|typeof|void|while|with|yield)\b/g},{match:/\/((?!\/)[^\r\n\\]|\\.)+\/[dgimsuy]*/g,sub:"regex"},{expand:"num"},{type:"num",match:/\b(NaN|null|undefined|[A-Z][A-Z_]*)\b/g},{type:"bool",match:/\b(true|false)\b/g},{type:"oper",match:/[/*+:?&|%^~=!,<>.^-]+/g},{type:"class",match:/\b[A-Z][\w_]*\b/g},{type:"func",match:/[a-zA-Z$_][\w$_]*(?=\s*((\?\.)?\s*\(|=\s*(\(?[\w,{}\[\])]+\)? =>|function\b)))/g}];export{t as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/js_template_literals.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: { 2 | match: { 3 | exec(str: any): { 4 | index: number; 5 | 0: any; 6 | }; 7 | lastIndex: any; 8 | }; 9 | sub: ({ 10 | type: string; 11 | match: RegExp; 12 | sub?: undefined; 13 | } | { 14 | match: RegExp; 15 | sub: string; 16 | type?: undefined; 17 | })[]; 18 | }[]; 19 | export default _default; 20 | export let type: string; 21 | //# sourceMappingURL=js_template_literals.d.ts.map -------------------------------------------------------------------------------- /dist/languages/js_template_literals.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"js_template_literals.d.ts","sourceRoot":"","sources":["../../src/languages/js_template_literals.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAiCA,wBAAwB"} -------------------------------------------------------------------------------- /dist/languages/js_template_literals.js: -------------------------------------------------------------------------------- 1 | var h=[{match:new class{exec(l){let e=this.lastIndex,t,n=i=>{for(;++e,.@\[\]]+}/g},{type:"var",match:/\[[\w\s="']+\]/g},...t],c="cmnt";export{a as default,c as type}; 2 | -------------------------------------------------------------------------------- /dist/languages/json.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | type: string; 3 | match: RegExp; 4 | expand?: undefined; 5 | } | { 6 | expand: string; 7 | type?: undefined; 8 | match?: undefined; 9 | })[]; 10 | export default _default; 11 | //# sourceMappingURL=json.d.ts.map -------------------------------------------------------------------------------- /dist/languages/json.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/languages/json.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/json.js: -------------------------------------------------------------------------------- 1 | var t=[{type:"var",match:/("|')?[a-zA-Z]\w*\1(?=\s*:)/g},{expand:"str"},{expand:"num"},{type:"num",match:/\bnull\b/g},{type:"bool",match:/\b(true|false)\b/g}];export{t as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/leanpub-md.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | type: string; 3 | match: RegExp; 4 | sub?: undefined; 5 | } | { 6 | match: RegExp; 7 | sub: (code: any) => { 8 | type: string; 9 | sub: { 10 | match: RegExp; 11 | sub: any; 12 | }[]; 13 | }; 14 | type?: undefined; 15 | } | { 16 | type: string; 17 | match: RegExp; 18 | sub: ({ 19 | type: string; 20 | match: RegExp; 21 | sub?: undefined; 22 | } | { 23 | match: RegExp; 24 | sub: (code: string) => ShjLanguage; 25 | type?: undefined; 26 | })[]; 27 | })[]; 28 | export default _default; 29 | //# sourceMappingURL=leanpub-md.d.ts.map -------------------------------------------------------------------------------- /dist/languages/leanpub-md.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"leanpub-md.d.ts","sourceRoot":"","sources":["../../src/languages/leanpub-md.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/log.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | type: string; 3 | match: RegExp; 4 | expand?: undefined; 5 | } | { 6 | expand: string; 7 | type?: undefined; 8 | match?: undefined; 9 | })[]; 10 | export default _default; 11 | //# sourceMappingURL=log.d.ts.map -------------------------------------------------------------------------------- /dist/languages/log.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/languages/log.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/log.js: -------------------------------------------------------------------------------- 1 | var e=[{type:"cmnt",match:/^#.*/gm},{expand:"strDouble"},{expand:"num"},{type:"err",match:/\b(err(or)?|[a-z_-]*exception|warn|warning|failed|ko|invalid|not ?found|alert|fatal)\b/gi},{type:"num",match:/\b(null|undefined)\b/gi},{type:"bool",match:/\b(false|true|yes|no)\b/gi},{type:"oper",match:/\.|,/g}];export{e as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/lua.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | expand?: undefined; 5 | type?: undefined; 6 | } | { 7 | expand: string; 8 | match?: undefined; 9 | sub?: undefined; 10 | type?: undefined; 11 | } | { 12 | type: string; 13 | match: RegExp; 14 | sub?: undefined; 15 | expand?: undefined; 16 | })[]; 17 | export default _default; 18 | //# sourceMappingURL=lua.d.ts.map -------------------------------------------------------------------------------- /dist/languages/lua.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"lua.d.ts","sourceRoot":"","sources":["../../src/languages/lua.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/lua.js: -------------------------------------------------------------------------------- 1 | var e=[{match:/^#!.*|--(\[(=*)\[((?!--\]\2\])[^])*--\]\2\]|.*)/g,sub:"todo"},{expand:"str"},{type:"kwd",match:/\b(and|break|do|else|elseif|end|for|function|if|in|local|not|or|repeat|return|then|until|while)\b/g},{type:"bool",match:/\b(true|false|nil)\b/g},{type:"oper",match:/[+*/%^#=~<>:,.-]+/g},{expand:"num"},{type:"func",match:/[a-z_]+(?=\s*[({])/g}];export{e as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/make.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | expand?: undefined; 5 | type?: undefined; 6 | } | { 7 | expand: string; 8 | match?: undefined; 9 | sub?: undefined; 10 | type?: undefined; 11 | } | { 12 | type: string; 13 | match: RegExp; 14 | sub?: undefined; 15 | expand?: undefined; 16 | })[]; 17 | export default _default; 18 | //# sourceMappingURL=make.d.ts.map -------------------------------------------------------------------------------- /dist/languages/make.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"make.d.ts","sourceRoot":"","sources":["../../src/languages/make.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/make.js: -------------------------------------------------------------------------------- 1 | var t=[{match:/^\s*#.*/gm,sub:"todo"},{expand:"str"},{type:"oper",match:/[${}()]+/g},{type:"class",match:/.PHONY:/gm},{type:"section",match:/^[\w.]+:/gm},{type:"kwd",match:/\b(ifneq|endif)\b/g},{expand:"num"},{type:"var",match:/[A-Z_]+(?=\s*=)/g},{match:/^.*$/gm,sub:"bash"}];export{t as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/md.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | type: string; 3 | match: RegExp; 4 | sub?: undefined; 5 | } | { 6 | match: RegExp; 7 | sub: (code: any) => { 8 | type: string; 9 | sub: { 10 | match: RegExp; 11 | sub: any; 12 | }[]; 13 | }; 14 | type?: undefined; 15 | })[]; 16 | export default _default; 17 | //# sourceMappingURL=md.d.ts.map -------------------------------------------------------------------------------- /dist/languages/md.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"md.d.ts","sourceRoot":"","sources":["../../src/languages/md.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/pl.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | type?: undefined; 5 | expand?: undefined; 6 | } | { 7 | type: string; 8 | match: RegExp; 9 | sub?: undefined; 10 | expand?: undefined; 11 | } | { 12 | expand: string; 13 | match?: undefined; 14 | sub?: undefined; 15 | type?: undefined; 16 | })[]; 17 | export default _default; 18 | //# sourceMappingURL=pl.d.ts.map -------------------------------------------------------------------------------- /dist/languages/pl.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"pl.d.ts","sourceRoot":"","sources":["../../src/languages/pl.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/pl.js: -------------------------------------------------------------------------------- 1 | var e=[{match:/#.*/g,sub:"todo"},{type:"str",match:/(["'])(\\[^]|(?!\1)[^])*\1?/g},{expand:"num"},{type:"kwd",match:/\b(any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while|not|and|or|xor)\b/g},{type:"oper",match:/[-+*/%~!&<>|=?,]+/g},{type:"func",match:/[a-z_]+(?=\s*\()/g}];export{e as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/plain.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: { 2 | expand: string; 3 | }[]; 4 | export default _default; 5 | //# sourceMappingURL=plain.d.ts.map -------------------------------------------------------------------------------- /dist/languages/plain.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"plain.d.ts","sourceRoot":"","sources":["../../src/languages/plain.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/plain.js: -------------------------------------------------------------------------------- 1 | var e=[{expand:"strDouble"}];export{e as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/py.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | type?: undefined; 5 | expand?: undefined; 6 | } | { 7 | type: string; 8 | match: RegExp; 9 | sub: { 10 | type: string; 11 | match: RegExp; 12 | sub: { 13 | match: RegExp; 14 | sub: string; 15 | }[]; 16 | }[]; 17 | expand?: undefined; 18 | } | { 19 | expand: string; 20 | match?: undefined; 21 | sub?: undefined; 22 | type?: undefined; 23 | } | { 24 | type: string; 25 | match: RegExp; 26 | sub?: undefined; 27 | expand?: undefined; 28 | })[]; 29 | export default _default; 30 | //# sourceMappingURL=py.d.ts.map -------------------------------------------------------------------------------- /dist/languages/py.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"py.d.ts","sourceRoot":"","sources":["../../src/languages/py.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/py.js: -------------------------------------------------------------------------------- 1 | var t=[{match:/#.*/g,sub:"todo"},{match:/("""|''')(\\[^]|(?!\1)[^])*\1?/g,sub:"todo"},{type:"str",match:/f("|')(\\[^]|(?!\1).)*\1?|f((["'])\4\4)(\\[^]|(?!\3)[^])*\3?/gi,sub:[{type:"var",match:/{[^{}]*}/g,sub:[{match:/(?!^{)[^]*(?=}$)/g,sub:"py"}]}]},{expand:"str"},{type:"kwd",match:/\b(and|as|assert|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|raise|return|try|while|with|yield)\b/g},{type:"bool",match:/\b(False|True|None)\b/g},{expand:"num"},{type:"func",match:/[a-z_]+(?=\s*\()/g},{type:"oper",match:/[-/*+<>,=!&|^%]+/g},{type:"class",match:/\b[A-Z][\w_]*\b/g}];export{t as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/regex.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | type?: undefined; 5 | } | { 6 | type: string; 7 | match: RegExp; 8 | sub?: undefined; 9 | })[]; 10 | export default _default; 11 | export let type: string; 12 | //# sourceMappingURL=regex.d.ts.map -------------------------------------------------------------------------------- /dist/languages/regex.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"regex.d.ts","sourceRoot":"","sources":["../../src/languages/regex.js"],"names":[],"mappings":";;;;;;;;;;AAkBA,wBAAyB"} -------------------------------------------------------------------------------- /dist/languages/regex.js: -------------------------------------------------------------------------------- 1 | var t=[{match:/^(?!\/).*/gm,sub:"todo"},{type:"num",match:/\[((?!\])[^\\]|\\.)*\]/g},{type:"kwd",match:/\||\^|\$|\\.|\w+($|\r|\n)/g},{type:"var",match:/\*|\+|\{\d+,\d+\}/g}],e="oper";export{t as default,e as type}; 2 | -------------------------------------------------------------------------------- /dist/languages/rs.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | expand?: undefined; 5 | type?: undefined; 6 | } | { 7 | expand: string; 8 | match?: undefined; 9 | sub?: undefined; 10 | type?: undefined; 11 | } | { 12 | type: string; 13 | match: RegExp; 14 | sub?: undefined; 15 | expand?: undefined; 16 | })[]; 17 | export default _default; 18 | //# sourceMappingURL=rs.d.ts.map -------------------------------------------------------------------------------- /dist/languages/rs.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"rs.d.ts","sourceRoot":"","sources":["../../src/languages/rs.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/rs.js: -------------------------------------------------------------------------------- 1 | var e=[{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:"todo"},{expand:"str"},{expand:"num"},{type:"kwd",match:/\b(as|break|const|continue|crate|else|enum|extern|false|fn|for|if|impl|in|let|loop|match|mod|move|mut|pub|ref|return|self|Self|static|struct|super|trait|true|type|unsafe|use|where|while|async|await|dyn|abstract|become|box|do|final|macro|override|priv|typeof|unsized|virtual|yield|try)\b/g},{type:"oper",match:/[/*+:?&|%^~=!,<>.^-]+/g},{type:"class",match:/\b[A-Z][\w_]*\b/g},{type:"func",match:/[a-zA-Z_][\w_]*(?=\s*!?\s*\()/g}];export{e as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/sql.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | expand?: undefined; 5 | type?: undefined; 6 | } | { 7 | expand: string; 8 | match?: undefined; 9 | sub?: undefined; 10 | type?: undefined; 11 | } | { 12 | type: string; 13 | match: RegExp; 14 | sub?: undefined; 15 | expand?: undefined; 16 | })[]; 17 | export default _default; 18 | //# sourceMappingURL=sql.d.ts.map -------------------------------------------------------------------------------- /dist/languages/sql.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"sql.d.ts","sourceRoot":"","sources":["../../src/languages/sql.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/todo.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: { 2 | type: string; 3 | match: RegExp; 4 | }[]; 5 | export default _default; 6 | export let type: string; 7 | //# sourceMappingURL=todo.d.ts.map -------------------------------------------------------------------------------- /dist/languages/todo.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"todo.d.ts","sourceRoot":"","sources":["../../src/languages/todo.js"],"names":[],"mappings":";;;;;AAkBA,wBAAyB"} -------------------------------------------------------------------------------- /dist/languages/todo.js: -------------------------------------------------------------------------------- 1 | var t=[{type:"err",match:/\b(TODO|FIXME|DEBUG|OPTIMIZE|WARNING|XXX|BUG)\b/g},{type:"class",match:/\bIDEA\b/g},{type:"insert",match:/\b(CHANGED|FIX|CHANGE)\b/g},{type:"oper",match:/\bQUESTION\b/g}],e="cmnt";export{t as default,e as type}; 2 | -------------------------------------------------------------------------------- /dist/languages/toml.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | type?: undefined; 5 | expand?: undefined; 6 | } | { 7 | type: string; 8 | match: RegExp; 9 | sub?: undefined; 10 | expand?: undefined; 11 | } | { 12 | expand: string; 13 | match?: undefined; 14 | sub?: undefined; 15 | type?: undefined; 16 | })[]; 17 | export default _default; 18 | //# sourceMappingURL=toml.d.ts.map -------------------------------------------------------------------------------- /dist/languages/toml.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"toml.d.ts","sourceRoot":"","sources":["../../src/languages/toml.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/toml.js: -------------------------------------------------------------------------------- 1 | var t=[{match:/#.*/g,sub:"todo"},{type:"str",match:/("""|''')((?!\1)[^]|\\[^])*\1?/g},{expand:"str"},{type:"section",match:/^\[.+\]\s*$/gm},{type:"num",match:/\b(inf|nan)\b|\d[\d:ZT.-]*/g},{expand:"num"},{type:"bool",match:/\b(true|false)\b/g},{type:"oper",match:/[+,.=-]/g},{type:"var",match:/\w+(?= \=)/g}];export{t as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/ts.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | expand?: undefined; 5 | type?: undefined; 6 | } | { 7 | expand: string; 8 | match?: undefined; 9 | sub?: undefined; 10 | type?: undefined; 11 | } | { 12 | type: string; 13 | match: RegExp; 14 | sub?: undefined; 15 | expand?: undefined; 16 | })[]; 17 | export default _default; 18 | //# sourceMappingURL=ts.d.ts.map -------------------------------------------------------------------------------- /dist/languages/ts.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"ts.d.ts","sourceRoot":"","sources":["../../src/languages/ts.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/ts.js: -------------------------------------------------------------------------------- 1 | var e=[{match:/\/\*\*((?!\*\/)[^])*(\*\/)?/g,sub:"jsdoc"},{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:"todo"},{expand:"str"},{match:/`((?!`)[^]|\\[^])*`?/g,sub:"js_template_literals"},{type:"kwd",match:/=>|\b(this|set|get|as|async|await|break|case|catch|class|const|constructor|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|if|implements|import|in|instanceof|interface|let|var|of|new|package|private|protected|public|return|static|super|switch|throw|throws|try|typeof|void|while|with|yield)\b/g},{match:/\/((?!\/)[^\r\n\\]|\\.)+\/[dgimsuy]*/g,sub:"regex"},{expand:"num"},{type:"num",match:/\b(NaN|null|undefined|[A-Z][A-Z_]*)\b/g},{type:"bool",match:/\b(true|false)\b/g},{type:"oper",match:/[/*+:?&|%^~=!,<>.^-]+/g},{type:"class",match:/\b[A-Z][\w_]*\b/g},{type:"func",match:/[a-zA-Z$_][\w$_]*(?=\s*((\?\.)?\s*\(|=\s*(\(?[\w,{}\[\])]+\)? =>|function\b)))/g}];var c=[{type:"type",match:/:\s*(any|void|number|boolean|string|object|never|enum)\b/g},{type:"kwd",match:/\b(type|namespace|typedef|interface|public|private|protected|implements|declare|abstract|readonly)\b/g},...e];export{c as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/uri.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | type?: undefined; 5 | } | { 6 | type: string; 7 | match: RegExp; 8 | sub?: undefined; 9 | })[]; 10 | export default _default; 11 | //# sourceMappingURL=uri.d.ts.map -------------------------------------------------------------------------------- /dist/languages/uri.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"uri.d.ts","sourceRoot":"","sources":["../../src/languages/uri.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/uri.js: -------------------------------------------------------------------------------- 1 | var t=[{match:/^#.*/gm,sub:"todo"},{type:"class",match:/^\w+(?=:?)/gm},{type:"num",match:/:\d+/g},{type:"oper",match:/[:/&?]|\w+=/g},{type:"func",match:/[.\w]+@|#[\w]+$/gm},{type:"var",match:/\w+\.\w+(\.\w+)*/g}];export{t as default}; 2 | -------------------------------------------------------------------------------- /dist/languages/xml.d.ts: -------------------------------------------------------------------------------- 1 | export let name: string; 2 | export let properties: string; 3 | export namespace xmlElement { 4 | let match: RegExp; 5 | let sub: ({ 6 | type: string; 7 | match: RegExp; 8 | sub: { 9 | type: string; 10 | match: RegExp; 11 | }[]; 12 | } | { 13 | type: string; 14 | match: RegExp; 15 | sub?: undefined; 16 | })[]; 17 | } 18 | declare const _default: ({ 19 | match: RegExp; 20 | sub: ({ 21 | type: string; 22 | match: RegExp; 23 | sub: { 24 | type: string; 25 | match: RegExp; 26 | }[]; 27 | } | { 28 | type: string; 29 | match: RegExp; 30 | sub?: undefined; 31 | })[]; 32 | } | { 33 | match: RegExp; 34 | sub: string; 35 | type?: undefined; 36 | } | { 37 | type: string; 38 | match: RegExp; 39 | sub?: undefined; 40 | })[]; 41 | export default _default; 42 | //# sourceMappingURL=xml.d.ts.map -------------------------------------------------------------------------------- /dist/languages/xml.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"xml.d.ts","sourceRoot":"","sources":["../../src/languages/xml.js"],"names":[],"mappings":"AAIC,wBAAyC;AACzC,8BAA4F"} -------------------------------------------------------------------------------- /dist/languages/xml.js: -------------------------------------------------------------------------------- 1 | var e=":A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD",u=e+"\\-\\.0-9\xB7\u0300-\u036F\u203F-\u2040",t=`[${e}][${u}]*`,a=`\\s*(\\s+${t}\\s*(=\\s*([^"']\\S*|("|')(\\\\[^]|(?!\\4)[^])*\\4?)?)?\\s*)*`,p={match:RegExp(`<[/!?]?${t}${a}[/!?]?>`,"g"),sub:[{type:"var",match:RegExp(`^<[/!?]?${t}`,"g"),sub:[{type:"oper",match:/^<[\/!?]?/g}]},{type:"str",match:/=\s*([^"']\S*|("|')(\\[^]|(?!\2)[^])*\2?)/g,sub:[{type:"oper",match:/^=/g}]},{type:"oper",match:/[\/!?]?>/g},{type:"class",match:RegExp(t,"g")}]},F=[{match:/)[^])*-->/g,sub:"todo"},{type:"class",match://gi},p,{type:"str",match:RegExp(`<\\?${t}([^?]|\\?[^?>])*\\?+>`,"g"),sub:[{type:"var",match:RegExp(`^<\\?${t}`,"g"),sub:[{type:"oper",match:/^<\?/g}]},{type:"oper",match:/\?+>$/g}]},{type:"var",match:/&(#x?)?[\da-z]{1,8};/gi}];export{F as default,t as name,a as properties,p as xmlElement}; 2 | -------------------------------------------------------------------------------- /dist/languages/yaml.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | expand?: undefined; 5 | type?: undefined; 6 | } | { 7 | expand: string; 8 | match?: undefined; 9 | sub?: undefined; 10 | type?: undefined; 11 | } | { 12 | type: string; 13 | match: RegExp; 14 | sub?: undefined; 15 | expand?: undefined; 16 | })[]; 17 | export default _default; 18 | //# sourceMappingURL=yaml.d.ts.map -------------------------------------------------------------------------------- /dist/languages/yaml.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"yaml.d.ts","sourceRoot":"","sources":["../../src/languages/yaml.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/languages/yaml.js: -------------------------------------------------------------------------------- 1 | var t=[{match:/#.*/g,sub:"todo"},{expand:"str"},{type:"str",match:/(>|\|)\r?\n((\s[^\n]*)?(\r?\n|$))*/g},{type:"type",match:/!![a-z]+/g},{type:"bool",match:/\b(Yes|No)\b/g},{type:"oper",match:/[+:-]/g},{expand:"num"},{type:"var",match:/[a-zA-Z]\w*(?=:)/g}];export{t as default}; 2 | -------------------------------------------------------------------------------- /dist/node/common.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace _default { 2 | namespace num { 3 | let type: string; 4 | let match: RegExp; 5 | } 6 | namespace str { 7 | let type_1: string; 8 | export { type_1 as type }; 9 | let match_1: RegExp; 10 | export { match_1 as match }; 11 | } 12 | namespace strDouble { 13 | let type_2: string; 14 | export { type_2 as type }; 15 | let match_2: RegExp; 16 | export { match_2 as match }; 17 | } 18 | } 19 | export default _default; 20 | //# sourceMappingURL=common.d.ts.map -------------------------------------------------------------------------------- /dist/node/common.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/common.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/common.js: -------------------------------------------------------------------------------- 1 | var m=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var b=(e,t)=>{for(var a in t)m(e,a,{get:t[a],enumerable:!0})},c=(e,t,a,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of s(t))!u.call(e,r)&&r!==a&&m(e,r,{get:()=>t[r],enumerable:!(n=p(t,r))||n.enumerable});return e};var d=e=>c(m({},"__esModule",{value:!0}),e);var h={};b(h,{default:()=>g});module.exports=d(h);var g={num:{type:"num",match:/(\.e?|\b)\d(e-|[\d.oxa-fA-F_])*(\.|\b)/g},str:{type:"str",match:/(["'])(\\[^]|(?!\1)[^\r\n\\])*\1?/g},strDouble:{type:"str",match:/"((?!")[^\r\n\\]|\\[^])*"?/g}}; 2 | -------------------------------------------------------------------------------- /dist/node/detect.d.ts: -------------------------------------------------------------------------------- 1 | export function detectLanguage(code: string): ShjLanguage; 2 | export type ShjLanguage = import("./index.js").ShjLanguage; 3 | //# sourceMappingURL=detect.d.ts.map -------------------------------------------------------------------------------- /dist/node/detect.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../../src/detect.js"],"names":[],"mappings":"AA8CO,qCAHI,MAAM,GACJ,WAAW,CAUvB;0BAhDY,OAAO,YAAY,EAAE,WAAW"} -------------------------------------------------------------------------------- /dist/node/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":"AAgDA;;;;;;;;;;GAUG;AACH,8BAPW,MAAM,QACN,WAAW,QAAM,SACjB,CAAS,IAAM,EAAN,MAAM,EAAE,IAAS,EAAT,QAAQ,YAAC,KAAE,IAAI,iBAyD1C;AAED;;;;;;;;;;;;GAYG;AACH,mCANW,MAAM,QACN,WAAW,6BAEX,UAAU,GACR,OAAO,CAAC,MAAM,CAAC,CAS3B;AAED;;;;;;;;;GASG;AACH,sCALW,OAAO,SACP,WAAW,SACX,cAAc,QACd,UAAU,iBAQpB;AASM,mCAFI,UAAU,mBAK2C;AAoBzD,2CAHI,MAAM,YACN;IAAE,OAAO,EAAE,qBAAqB,CAAA;CAAE,QAI5C;;;;0BAlLY,CAAC,KAAK,GAAC,MAAM,GAAC,IAAI,GAAC,GAAG,GAAC,KAAK,GAAC,KAAK,GAAC,MAAM,GAAC,QAAQ,GAAC,KAAK,GAAC,IAAI,GAAC,MAAM,GAAC,MAAM,GAAC,KAAK,GAAC,MAAM,GAAC,IAAI,GAAC,OAAO,GAAC,MAAM,GAAC,YAAY,GAAC,KAAK,GAAC,KAAK,GAAC,MAAM,GAAC,IAAI,GAAC,IAAI,GAAC,OAAO,GAAC,IAAI,GAAC,OAAO,GAAC,IAAI,GAAC,KAAK,GAAC,MAAM,GAAC,MAAM,GAAC,IAAI,GAAC,KAAK,GAAC,KAAK,GAAC,MAAM,CAAC;;;;8BAK7N,CAAC,WAAW,GAAC,aAAa,GAAC,YAAY,GAAC,MAAM,GAAC,SAAS,GAAC,cAAc,GAAC,oBAAoB,CAAC;;;;;;;;;;;;6BAS7F,CAAC,QAAQ,GAAC,SAAS,GAAC,WAAW,CAAC;;;;uBAQhC,CAAC,SAAS,GAAC,KAAK,GAAC,KAAK,GAAC,SAAS,GAAC,KAAK,GAAC,OAAO,GAAC,MAAM,GAAC,QAAQ,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,KAAK,GAAC,MAAM,GAAC,KAAK,GAAC,KAAK,CAAC;mCAyI7G;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACrC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,GAAG,qBAAqB,IAAG,CAAC,IAAI,EAAC,MAAM,KAAK,oBAAoB,CAAA,CAAA;CAAE,GAC9F;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;oCAKZ,oBAAoB,EAAE"} -------------------------------------------------------------------------------- /dist/node/languages/asm.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | type: string; 3 | match: RegExp; 4 | expand?: undefined; 5 | sub?: undefined; 6 | } | { 7 | expand: string; 8 | type?: undefined; 9 | match?: undefined; 10 | sub?: undefined; 11 | } | { 12 | type: string; 13 | match: RegExp; 14 | sub: { 15 | type: string; 16 | match: RegExp; 17 | }[]; 18 | expand?: undefined; 19 | })[]; 20 | export default _default; 21 | //# sourceMappingURL=asm.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/asm.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"asm.d.ts","sourceRoot":"","sources":["../../../src/languages/asm.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/asm.js: -------------------------------------------------------------------------------- 1 | var p=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var n=(a,t)=>{for(var e in t)p(a,e,{get:t[e],enumerable:!0})},y=(a,t,e,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let m of g(t))!h.call(a,m)&&m!==e&&p(a,m,{get:()=>t[m],enumerable:!(c=d(t,m))||c.enumerable});return a};var u=a=>y(p({},"__esModule",{value:!0}),a);var b={};n(b,{default:()=>z});module.exports=u(b);var z=[{type:"cmnt",match:/(;|#).*/gm},{expand:"str"},{expand:"num"},{type:"num",match:/\$[\da-fA-F]*\b/g},{type:"kwd",match:/^[a-z]+\s+[a-z.]+\b/gm,sub:[{type:"func",match:/^[a-z]+/g}]},{type:"kwd",match:/^\t*[a-z][a-z\d]*\b/gm},{match:/%|\$/g,type:"oper"}]; 2 | -------------------------------------------------------------------------------- /dist/node/languages/bash.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | type: string; 3 | match: RegExp; 4 | } | { 5 | sub: string; 6 | match: RegExp; 7 | expand?: undefined; 8 | } | { 9 | expand: string; 10 | sub?: undefined; 11 | match?: undefined; 12 | })[]; 13 | export default _default; 14 | //# sourceMappingURL=bash.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/bash.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"bash.d.ts","sourceRoot":"","sources":["../../../src/languages/bash.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/bash.js: -------------------------------------------------------------------------------- 1 | var l=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var n=(t,e)=>{for(var s in e)l(t,s,{get:e[s],enumerable:!0})},m=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of o(e))!i.call(t,a)&&a!==s&&l(t,a,{get:()=>e[a],enumerable:!(r=p(e,a))||r.enumerable});return t};var d=t=>m(l({},"__esModule",{value:!0}),t);var u={};n(u,{default:()=>h});module.exports=d(u);var c={type:"var",match:/\$\w+|\${[^}]*}|\$\([^)]*\)/g},h=[{sub:"todo",match:/#.*/g},{type:"str",match:/(["'])((?!\1)[^\r\n\\]|\\[^])*\1?/g,sub:[c]},{type:"oper",match:/(?<=\s|^)\.*\/[a-z/_.-]+/gi},{type:"kwd",match:/\s-[a-zA-Z]+|$<|[&|;]+|\b(unset|readonly|shift|export|if|fi|else|elif|while|do|done|for|until|case|esac|break|continue|exit|return|trap|wait|eval|exec|then|declare|enable|local|select|typeset|time|add|remove|install|update|delete)(?=\s|$)/g},{expand:"num"},{type:"func",match:/(?<=(^|\||\&\&|\;)\s*)[a-z_.-]+(?=\s|$)/gmi},{type:"bool",match:/(?<=\s|^)(true|false)(?=\s|$)/g},{type:"oper",match:/[=(){}<>!]+/g},{type:"var",match:/(?<=\s|^)[\w_]+(?=\s*=)/g},c]; 2 | -------------------------------------------------------------------------------- /dist/node/languages/bf.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | type?: undefined; 5 | } | { 6 | type: string; 7 | match: RegExp; 8 | sub?: undefined; 9 | })[]; 10 | export default _default; 11 | //# sourceMappingURL=bf.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/bf.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"bf.d.ts","sourceRoot":"","sources":["../../../src/languages/bf.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/bf.js: -------------------------------------------------------------------------------- 1 | var p=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var d=(e,t)=>{for(var c in t)p(e,c,{get:t[c],enumerable:!0})},u=(e,t,c,g)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of m(t))!o.call(e,a)&&a!==c&&p(e,a,{get:()=>t[a],enumerable:!(g=h(t,a))||g.enumerable});return e};var y=e=>u(p({},"__esModule",{value:!0}),e);var r={};d(r,{default:()=>f});module.exports=y(r);var f=[{match:/[^\[\->+.<\]\s].*/g,sub:"todo"},{type:"func",match:/\.+/g},{type:"kwd",match:/[<>]+/g},{type:"oper",match:/[+-]+/g}]; 2 | -------------------------------------------------------------------------------- /dist/node/languages/c.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | expand?: undefined; 5 | type?: undefined; 6 | } | { 7 | expand: string; 8 | match?: undefined; 9 | sub?: undefined; 10 | type?: undefined; 11 | } | { 12 | type: string; 13 | match: RegExp; 14 | sub: { 15 | type: string; 16 | match: RegExp; 17 | }[]; 18 | expand?: undefined; 19 | } | { 20 | match: RegExp; 21 | sub: ({ 22 | type: string; 23 | match: RegExp; 24 | sub?: undefined; 25 | } | { 26 | match: RegExp; 27 | sub: string; 28 | type?: undefined; 29 | })[]; 30 | expand?: undefined; 31 | type?: undefined; 32 | } | { 33 | type: string; 34 | match: RegExp; 35 | sub?: undefined; 36 | expand?: undefined; 37 | })[]; 38 | export default _default; 39 | //# sourceMappingURL=c.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/c.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"c.d.ts","sourceRoot":"","sources":["../../../src/languages/c.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/c.js: -------------------------------------------------------------------------------- 1 | var c=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var d=(e,t)=>{for(var s in t)c(e,s,{get:t[s],enumerable:!0})},g=(e,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of u(t))!m.call(e,a)&&a!==s&&c(e,a,{get:()=>t[a],enumerable:!(n=o(t,a))||n.enumerable});return e};var h=e=>g(c({},"__esModule",{value:!0}),e);var r={};d(r,{default:()=>i});module.exports=h(r);var i=[{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:"todo"},{expand:"str"},{expand:"num"},{type:"kwd",match:/#\s*include (<.*>|".*")/g,sub:[{type:"str",match:/(<|").*/g}]},{match:/asm\s*{[^}]*}/g,sub:[{type:"kwd",match:/^asm/g},{match:/[^{}]*(?=}$)/g,sub:"asm"}]},{type:"kwd",match:/\*|&|#[a-z]+\b|\b(asm|auto|double|int|struct|break|else|long|switch|case|enum|register|typedef|char|extern|return|union|const|float|short|unsigned|continue|for|signed|void|default|goto|sizeof|volatile|do|if|static|while)\b/g},{type:"oper",match:/[/*+:?&|%^~=!,<>.^-]+/g},{type:"func",match:/[a-zA-Z_][\w_]*(?=\s*\()/g},{type:"class",match:/\b[A-Z][\w_]*\b/g}]; 2 | -------------------------------------------------------------------------------- /dist/node/languages/css.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | expand?: undefined; 5 | type?: undefined; 6 | } | { 7 | expand: string; 8 | match?: undefined; 9 | sub?: undefined; 10 | type?: undefined; 11 | } | { 12 | type: string; 13 | match: RegExp; 14 | sub?: undefined; 15 | expand?: undefined; 16 | } | { 17 | type: string; 18 | match: RegExp; 19 | sub: { 20 | type: string; 21 | match: RegExp; 22 | }[]; 23 | expand?: undefined; 24 | } | { 25 | match: RegExp; 26 | sub: { 27 | type: string; 28 | match: RegExp; 29 | }[]; 30 | expand?: undefined; 31 | type?: undefined; 32 | })[]; 33 | export default _default; 34 | //# sourceMappingURL=css.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/css.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../../src/languages/css.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/css.js: -------------------------------------------------------------------------------- 1 | var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var u=(a,t)=>{for(var c in t)e(a,c,{get:t[c],enumerable:!0})},b=(a,t,c,p)=>{if(t&&typeof t=="object"||typeof t=="function")for(let m of g(t))!n.call(a,m)&&m!==c&&e(a,m,{get:()=>t[m],enumerable:!(p=h(t,m))||p.enumerable});return a};var y=a=>b(e({},"__esModule",{value:!0}),a);var d={};u(d,{default:()=>r});module.exports=y(d);var r=[{match:/\/\*((?!\*\/)[^])*(\*\/)?/g,sub:"todo"},{expand:"str"},{type:"kwd",match:/@\w+\b|\b(and|not|only|or)\b|\b[a-z-]+(?=[^{}]*{)/g},{type:"var",match:/\b[\w-]+(?=\s*:)|(::?|\.)[\w-]+(?=[^{}]*{)/g},{type:"func",match:/#[\w-]+(?=[^{}]*{)/g},{type:"num",match:/#[\da-f]{3,8}/g},{type:"num",match:/\d+(\.\d+)?(cm|mm|in|px|pt|pc|em|ex|ch|rem|vm|vh|vmin|vmax|%)?/g,sub:[{type:"var",match:/[a-z]+|%/g}]},{match:/url\([^)]*\)/g,sub:[{type:"func",match:/url(?=\()/g},{type:"str",match:/[^()]+/g}]},{type:"func",match:/\b[a-zA-Z]\w*(?=\s*\()/g},{type:"num",match:/\b[a-z-]+\b/g}]; 2 | -------------------------------------------------------------------------------- /dist/node/languages/csv.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | expand: string; 3 | type?: undefined; 4 | match?: undefined; 5 | } | { 6 | type: string; 7 | match: RegExp; 8 | expand?: undefined; 9 | })[]; 10 | export default _default; 11 | //# sourceMappingURL=csv.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/csv.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"csv.d.ts","sourceRoot":"","sources":["../../../src/languages/csv.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/csv.js: -------------------------------------------------------------------------------- 1 | var o=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var x=(t,e)=>{for(var a in e)o(t,a,{get:e[a],enumerable:!0})},b=(t,e,a,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of l(e))!u.call(t,p)&&p!==a&&o(t,p,{get:()=>e[p],enumerable:!(r=d(e,p))||r.enumerable});return t};var c=t=>b(o({},"__esModule",{value:!0}),t);var g={};x(g,{default:()=>f});module.exports=c(g);var f=[{expand:"strDouble"},{type:"oper",match:/,/g}]; 2 | -------------------------------------------------------------------------------- /dist/node/languages/diff.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: { 2 | type: string; 3 | match: RegExp; 4 | }[]; 5 | export default _default; 6 | //# sourceMappingURL=diff.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/diff.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../../src/languages/diff.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/diff.js: -------------------------------------------------------------------------------- 1 | var c=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var y=(e,t)=>{for(var a in t)c(e,a,{get:t[a],enumerable:!0})},i=(e,t,a,d)=>{if(t&&typeof t=="object"||typeof t=="function")for(let m of g(t))!h.call(e,m)&&m!==a&&c(e,m,{get:()=>t[m],enumerable:!(d=p(t,m))||d.enumerable});return e};var l=e=>i(c({},"__esModule",{value:!0}),e);var o={};y(o,{default:()=>n});module.exports=l(o);var n=[{type:"deleted",match:/^[-<].*/gm},{type:"insert",match:/^[+>].*/gm},{type:"kwd",match:/!.*/gm},{type:"section",match:/^@@.*@@$|^\d.*|^([*-+])\1\1.*/gm}]; 2 | -------------------------------------------------------------------------------- /dist/node/languages/docker.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | type: string; 3 | match: RegExp; 4 | } | { 5 | sub: string; 6 | match: RegExp; 7 | expand?: undefined; 8 | } | { 9 | expand: string; 10 | sub?: undefined; 11 | match?: undefined; 12 | })[]; 13 | export default _default; 14 | //# sourceMappingURL=docker.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/docker.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../../../src/languages/docker.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/docker.js: -------------------------------------------------------------------------------- 1 | var r=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var d=(t,e)=>{for(var s in e)r(t,s,{get:e[s],enumerable:!0})},h=(t,e,s,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of m(e))!i.call(t,a)&&a!==s&&r(t,a,{get:()=>e[a],enumerable:!(l=o(e,a))||l.enumerable});return t};var n=t=>h(r({},"__esModule",{value:!0}),t);var y={};d(y,{default:()=>u});module.exports=n(y);var p={type:"var",match:/\$\w+|\${[^}]*}|\$\([^)]*\)/g},c=[{sub:"todo",match:/#.*/g},{type:"str",match:/(["'])((?!\1)[^\r\n\\]|\\[^])*\1?/g,sub:[p]},{type:"oper",match:/(?<=\s|^)\.*\/[a-z/_.-]+/gi},{type:"kwd",match:/\s-[a-zA-Z]+|$<|[&|;]+|\b(unset|readonly|shift|export|if|fi|else|elif|while|do|done|for|until|case|esac|break|continue|exit|return|trap|wait|eval|exec|then|declare|enable|local|select|typeset|time|add|remove|install|update|delete)(?=\s|$)/g},{expand:"num"},{type:"func",match:/(?<=(^|\||\&\&|\;)\s*)[a-z_.-]+(?=\s|$)/gmi},{type:"bool",match:/(?<=\s|^)(true|false)(?=\s|$)/g},{type:"oper",match:/[=(){}<>!]+/g},{type:"var",match:/(?<=\s|^)[\w_]+(?=\s*=)/g},p];var u=[{type:"kwd",match:/^(FROM|RUN|CMD|LABEL|MAINTAINER|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ARG|ONBUILD|STOPSIGNAL|HEALTHCHECK|SHELL)\b/gmi},...c]; 2 | -------------------------------------------------------------------------------- /dist/node/languages/git.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | type: string; 3 | match: RegExp; 4 | } | { 5 | match: RegExp; 6 | sub: string; 7 | expand?: undefined; 8 | } | { 9 | expand: string; 10 | match?: undefined; 11 | sub?: undefined; 12 | })[]; 13 | export default _default; 14 | //# sourceMappingURL=git.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/git.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../../src/languages/git.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/git.js: -------------------------------------------------------------------------------- 1 | var c=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var f=(m,t)=>{for(var a in t)c(m,a,{get:t[a],enumerable:!0})},i=(m,t,a,d)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of o(t))!h.call(m,e)&&e!==a&&c(m,e,{get:()=>t[e],enumerable:!(d=g(t,e))||d.enumerable});return m};var r=m=>i(c({},"__esModule",{value:!0}),m);var s={};f(s,{default:()=>y});module.exports=r(s);var p=[{type:"deleted",match:/^[-<].*/gm},{type:"insert",match:/^[+>].*/gm},{type:"kwd",match:/!.*/gm},{type:"section",match:/^@@.*@@$|^\d.*|^([*-+])\1\1.*/gm}];var y=[{match:/^#.*/gm,sub:"todo"},{expand:"str"},...p,{type:"func",match:/^(\$ )?git(\s.*)?$/gm},{type:"kwd",match:/^commit \w+$/gm}]; 2 | -------------------------------------------------------------------------------- /dist/node/languages/go.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | expand?: undefined; 5 | type?: undefined; 6 | } | { 7 | expand: string; 8 | match?: undefined; 9 | sub?: undefined; 10 | type?: undefined; 11 | } | { 12 | type: string; 13 | match: RegExp; 14 | sub?: undefined; 15 | expand?: undefined; 16 | })[]; 17 | export default _default; 18 | //# sourceMappingURL=go.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/go.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"go.d.ts","sourceRoot":"","sources":["../../../src/languages/go.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/go.js: -------------------------------------------------------------------------------- 1 | var r=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var g=(e,t)=>{for(var c in t)r(e,c,{get:t[c],enumerable:!0})},u=(e,t,c,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of p(t))!s.call(e,a)&&a!==c&&r(e,a,{get:()=>t[a],enumerable:!(n=o(t,a))||n.enumerable});return e};var f=e=>u(r({},"__esModule",{value:!0}),e);var m={};g(m,{default:()=>h});module.exports=f(m);var h=[{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:"todo"},{expand:"str"},{expand:"num"},{type:"kwd",match:/\*|&|\b(break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go|goto|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/g},{type:"func",match:/[a-zA-Z_][\w_]*(?=\s*\()/g},{type:"class",match:/\b[A-Z][\w_]*\b/g},{type:"oper",match:/[+\-*\/%&|^~=!<>.^-]+/g}]; 2 | -------------------------------------------------------------------------------- /dist/node/languages/html.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: ({ 4 | type: string; 5 | match: RegExp; 6 | sub: { 7 | type: string; 8 | match: RegExp; 9 | }[]; 10 | } | { 11 | type: string; 12 | match: RegExp; 13 | sub?: undefined; 14 | })[]; 15 | } | { 16 | match: RegExp; 17 | sub: string; 18 | type?: undefined; 19 | } | { 20 | type: string; 21 | match: RegExp; 22 | sub?: undefined; 23 | } | { 24 | match: RegExp; 25 | sub: ({ 26 | match: RegExp; 27 | sub: ({ 28 | type: string; 29 | match: RegExp; 30 | sub: { 31 | type: string; 32 | match: RegExp; 33 | }[]; 34 | } | { 35 | type: string; 36 | match: RegExp; 37 | sub?: undefined; 38 | })[]; 39 | } | { 40 | match: RegExp; 41 | sub: string; 42 | })[]; 43 | })[]; 44 | export default _default; 45 | //# sourceMappingURL=html.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/html.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../../src/languages/html.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/html.js: -------------------------------------------------------------------------------- 1 | var c=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var $=(s,t)=>{for(var m in t)c(s,m,{get:t[m],enumerable:!0})},l=(s,t,m,g)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of y(t))!x.call(s,a)&&a!==m&&c(s,a,{get:()=>t[a],enumerable:!(g=F(t,a))||g.enumerable});return s};var E=s=>l(c({},"__esModule",{value:!0}),s);var i={};$(i,{default:()=>o});module.exports=E(i);var r=":A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD",b=r+"\\-\\.0-9\xB7\u0300-\u036F\u203F-\u2040",p=`[${r}][${b}]*`,u=`\\s*(\\s+${p}\\s*(=\\s*([^"']\\S*|("|')(\\\\[^]|(?!\\4)[^])*\\4?)?)?\\s*)*`,e={match:RegExp(`<[/!?]?${p}${u}[/!?]?>`,"g"),sub:[{type:"var",match:RegExp(`^<[/!?]?${p}`,"g"),sub:[{type:"oper",match:/^<[\/!?]?/g}]},{type:"str",match:/=\s*([^"']\S*|("|')(\\[^]|(?!\2)[^])*\2?)/g,sub:[{type:"oper",match:/^=/g}]},{type:"oper",match:/[\/!?]?>/g},{type:"class",match:RegExp(p,"g")}]},h=[{match:/)[^])*-->/g,sub:"todo"},{type:"class",match://gi},e,{type:"str",match:RegExp(`<\\?${p}([^?]|\\?[^?>])*\\?+>`,"g"),sub:[{type:"var",match:RegExp(`^<\\?${p}`,"g"),sub:[{type:"oper",match:/^<\?/g}]},{type:"oper",match:/\?+>$/g}]},{type:"var",match:/&(#x?)?[\da-z]{1,8};/gi}];var o=[{type:"class",match:/])*>/gi,sub:[{type:"str",match:/"[^"]*"|'[^']*'/g},{type:"oper",match:/^$/g},{type:"var",match:/DOCTYPE/gi}]},{match:RegExp(`((?!)[^])*`,"g"),sub:[{match:RegExp(`^`,"g"),sub:e.sub},{match:RegExp(`${e.match}|[^]*(?=$)`,"g"),sub:"css"},e]},{match:RegExp(`((?!)[^])*`,"g"),sub:[{match:RegExp(`^`,"g"),sub:e.sub},{match:RegExp(`${e.match}|[^]*(?=$)`,"g"),sub:"js"},e]},...h]; 2 | -------------------------------------------------------------------------------- /dist/node/languages/http.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | type: string; 3 | match: RegExp; 4 | expand?: undefined; 5 | sub?: undefined; 6 | } | { 7 | expand: string; 8 | type?: undefined; 9 | match?: undefined; 10 | sub?: undefined; 11 | } | { 12 | match: RegExp; 13 | sub: (code: string) => ShjLanguage; 14 | type?: undefined; 15 | expand?: undefined; 16 | })[]; 17 | export default _default; 18 | //# sourceMappingURL=http.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/http.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/languages/http.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/ini.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | type?: undefined; 5 | } | { 6 | type: string; 7 | match: RegExp; 8 | sub?: undefined; 9 | })[]; 10 | export default _default; 11 | //# sourceMappingURL=ini.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/ini.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"ini.d.ts","sourceRoot":"","sources":["../../../src/languages/ini.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/ini.js: -------------------------------------------------------------------------------- 1 | var c=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var s=(e,t)=>{for(var m in t)c(e,m,{get:t[m],enumerable:!0})},r=(e,t,m,p)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of h(t))!o.call(e,a)&&a!==m&&c(e,a,{get:()=>t[a],enumerable:!(p=g(t,a))||p.enumerable});return e};var y=e=>r(c({},"__esModule",{value:!0}),e);var f={};s(f,{default:()=>d});module.exports=y(f);var d=[{match:/(^[ \f\t\v]*)[#;].*/gm,sub:"todo"},{type:"str",match:/.*/g},{type:"var",match:/.*(?==)/g},{type:"section",match:/^\s*\[.+\]\s*$/gm},{type:"oper",match:/=/g}]; 2 | -------------------------------------------------------------------------------- /dist/node/languages/java.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | expand?: undefined; 5 | type?: undefined; 6 | } | { 7 | expand: string; 8 | match?: undefined; 9 | sub?: undefined; 10 | type?: undefined; 11 | } | { 12 | type: string; 13 | match: RegExp; 14 | sub?: undefined; 15 | expand?: undefined; 16 | })[]; 17 | export default _default; 18 | //# sourceMappingURL=java.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/java.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"java.d.ts","sourceRoot":"","sources":["../../../src/languages/java.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/java.js: -------------------------------------------------------------------------------- 1 | var n=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var l=(e,t)=>{for(var s in t)n(e,s,{get:t[s],enumerable:!0})},p=(e,t,s,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of c(t))!i.call(e,a)&&a!==s&&n(e,a,{get:()=>t[a],enumerable:!(o=r(t,a))||o.enumerable});return e};var h=e=>p(n({},"__esModule",{value:!0}),e);var u={};l(u,{default:()=>d});module.exports=h(u);var d=[{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:"todo"},{expand:"str"},{expand:"num"},{type:"kwd",match:/\b(abstract|assert|boolean|break|byte|case|catch|char|class|continue|const|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|package|private|protected|public|requires|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|transient|try|var|void|volatile|while)\b/g},{type:"oper",match:/[/*+:?&|%^~=!,<>.^-]+/g},{type:"func",match:/[a-zA-Z_][\w_]*(?=\s*\()/g},{type:"class",match:/\b[A-Z][\w_]*\b/g}]; 2 | -------------------------------------------------------------------------------- /dist/node/languages/js.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | expand?: undefined; 5 | type?: undefined; 6 | } | { 7 | expand: string; 8 | match?: undefined; 9 | sub?: undefined; 10 | type?: undefined; 11 | } | { 12 | type: string; 13 | match: RegExp; 14 | sub?: undefined; 15 | expand?: undefined; 16 | })[]; 17 | export default _default; 18 | //# sourceMappingURL=js.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/js.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"js.d.ts","sourceRoot":"","sources":["../../../src/languages/js.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/js.js: -------------------------------------------------------------------------------- 1 | var c=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var u=(e,t)=>{for(var s in t)c(e,s,{get:t[s],enumerable:!0})},l=(e,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of r(t))!i.call(e,a)&&a!==s&&c(e,a,{get:()=>t[a],enumerable:!(n=o(t,a))||n.enumerable});return e};var p=e=>l(c({},"__esModule",{value:!0}),e);var b={};u(b,{default:()=>m});module.exports=p(b);var m=[{match:/\/\*\*((?!\*\/)[^])*(\*\/)?/g,sub:"jsdoc"},{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:"todo"},{expand:"str"},{match:/`((?!`)[^]|\\[^])*`?/g,sub:"js_template_literals"},{type:"kwd",match:/=>|\b(this|set|get|as|async|await|break|case|catch|class|const|constructor|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|if|implements|import|in|instanceof|interface|let|var|of|new|package|private|protected|public|return|static|super|switch|throw|throws|try|typeof|void|while|with|yield)\b/g},{match:/\/((?!\/)[^\r\n\\]|\\.)+\/[dgimsuy]*/g,sub:"regex"},{expand:"num"},{type:"num",match:/\b(NaN|null|undefined|[A-Z][A-Z_]*)\b/g},{type:"bool",match:/\b(true|false)\b/g},{type:"oper",match:/[/*+:?&|%^~=!,<>.^-]+/g},{type:"class",match:/\b[A-Z][\w_]*\b/g},{type:"func",match:/[a-zA-Z$_][\w$_]*(?=\s*((\?\.)?\s*\(|=\s*(\(?[\w,{}\[\])]+\)? =>|function\b)))/g}]; 2 | -------------------------------------------------------------------------------- /dist/node/languages/js_template_literals.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: { 2 | match: { 3 | exec(str: any): { 4 | index: number; 5 | 0: any; 6 | }; 7 | lastIndex: any; 8 | }; 9 | sub: ({ 10 | type: string; 11 | match: RegExp; 12 | sub?: undefined; 13 | } | { 14 | match: RegExp; 15 | sub: string; 16 | type?: undefined; 17 | })[]; 18 | }[]; 19 | export default _default; 20 | export let type: string; 21 | //# sourceMappingURL=js_template_literals.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/js_template_literals.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"js_template_literals.d.ts","sourceRoot":"","sources":["../../../src/languages/js_template_literals.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAiCA,wBAAwB"} -------------------------------------------------------------------------------- /dist/node/languages/js_template_literals.js: -------------------------------------------------------------------------------- 1 | var h=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var f=(l,e)=>{for(var t in e)h(l,t,{get:e[t],enumerable:!0})},x=(l,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of u(e))!c.call(l,n)&&n!==t&&h(l,n,{get:()=>e[n],enumerable:!(i=a(e,n))||i.enumerable});return l};var d=l=>x(h({},"__esModule",{value:!0}),l);var g={};f(g,{default:()=>s,type:()=>$});module.exports=d(g);var s=[{match:new class{exec(l){let e=this.lastIndex,t,i=n=>{for(;++e{for(var a in t)c(e,a,{get:t[a],enumerable:!0})},h=(e,t,a,m)=>{if(t&&typeof t=="object"||typeof t=="function")for(let p of y(t))!b.call(e,p)&&p!==a&&c(e,p,{get:()=>t[p],enumerable:!(m=o(t,p))||m.enumerable});return e};var s=e=>h(c({},"__esModule",{value:!0}),e);var l={};g(l,{default:()=>E,type:()=>I});module.exports=s(l);var r=[{type:"err",match:/\b(TODO|FIXME|DEBUG|OPTIMIZE|WARNING|XXX|BUG)\b/g},{type:"class",match:/\bIDEA\b/g},{type:"insert",match:/\b(CHANGED|FIX|CHANGE)\b/g},{type:"oper",match:/\bQUESTION\b/g}];var E=[{type:"kwd",match:/@\w+/g},{type:"class",match:/{[\w\s|<>,.@\[\]]+}/g},{type:"var",match:/\[[\w\s="']+\]/g},...r],I="cmnt";0&&(module.exports={type}); 2 | -------------------------------------------------------------------------------- /dist/node/languages/json.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | type: string; 3 | match: RegExp; 4 | expand?: undefined; 5 | } | { 6 | expand: string; 7 | type?: undefined; 8 | match?: undefined; 9 | })[]; 10 | export default _default; 11 | //# sourceMappingURL=json.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/json.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../src/languages/json.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/json.js: -------------------------------------------------------------------------------- 1 | var b=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var r=(a,t)=>{for(var p in t)b(a,p,{get:t[p],enumerable:!0})},c=(a,t,p,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of n(t))!u.call(a,e)&&e!==p&&b(a,e,{get:()=>t[e],enumerable:!(l=m(t,e))||l.enumerable});return a};var d=a=>c(b({},"__esModule",{value:!0}),a);var h={};r(h,{default:()=>g});module.exports=d(h);var g=[{type:"var",match:/("|')?[a-zA-Z]\w*\1(?=\s*:)/g},{expand:"str"},{expand:"num"},{type:"num",match:/\bnull\b/g},{type:"bool",match:/\b(true|false)\b/g}]; 2 | -------------------------------------------------------------------------------- /dist/node/languages/leanpub-md.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | type: string; 3 | match: RegExp; 4 | sub?: undefined; 5 | } | { 6 | match: RegExp; 7 | sub: (code: any) => { 8 | type: string; 9 | sub: { 10 | match: RegExp; 11 | sub: any; 12 | }[]; 13 | }; 14 | type?: undefined; 15 | } | { 16 | type: string; 17 | match: RegExp; 18 | sub: ({ 19 | type: string; 20 | match: RegExp; 21 | sub?: undefined; 22 | } | { 23 | match: RegExp; 24 | sub: (code: string) => ShjLanguage; 25 | type?: undefined; 26 | })[]; 27 | })[]; 28 | export default _default; 29 | //# sourceMappingURL=leanpub-md.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/leanpub-md.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"leanpub-md.d.ts","sourceRoot":"","sources":["../../../src/languages/leanpub-md.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/log.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | type: string; 3 | match: RegExp; 4 | expand?: undefined; 5 | } | { 6 | expand: string; 7 | type?: undefined; 8 | match?: undefined; 9 | })[]; 10 | export default _default; 11 | //# sourceMappingURL=log.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/log.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/languages/log.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/log.js: -------------------------------------------------------------------------------- 1 | var r=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var m=(t,e)=>{for(var n in e)r(t,n,{get:e[n],enumerable:!0})},b=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of p(e))!i.call(t,a)&&a!==n&&r(t,a,{get:()=>e[a],enumerable:!(o=l(e,a))||o.enumerable});return t};var d=t=>b(r({},"__esModule",{value:!0}),t);var c={};m(c,{default:()=>u});module.exports=d(c);var u=[{type:"cmnt",match:/^#.*/gm},{expand:"strDouble"},{expand:"num"},{type:"err",match:/\b(err(or)?|[a-z_-]*exception|warn|warning|failed|ko|invalid|not ?found|alert|fatal)\b/gi},{type:"num",match:/\b(null|undefined)\b/gi},{type:"bool",match:/\b(false|true|yes|no)\b/gi},{type:"oper",match:/\.|,/g}]; 2 | -------------------------------------------------------------------------------- /dist/node/languages/lua.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | expand?: undefined; 5 | type?: undefined; 6 | } | { 7 | expand: string; 8 | match?: undefined; 9 | sub?: undefined; 10 | type?: undefined; 11 | } | { 12 | type: string; 13 | match: RegExp; 14 | sub?: undefined; 15 | expand?: undefined; 16 | })[]; 17 | export default _default; 18 | //# sourceMappingURL=lua.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/lua.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"lua.d.ts","sourceRoot":"","sources":["../../../src/languages/lua.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/lua.js: -------------------------------------------------------------------------------- 1 | var o=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var d=(t,e)=>{for(var n in e)o(t,n,{get:e[n],enumerable:!0})},u=(t,e,n,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of p(e))!c.call(t,a)&&a!==n&&o(t,a,{get:()=>e[a],enumerable:!(l=r(e,a))||l.enumerable});return t};var b=t=>u(o({},"__esModule",{value:!0}),t);var h={};d(h,{default:()=>f});module.exports=b(h);var f=[{match:/^#!.*|--(\[(=*)\[((?!--\]\2\])[^])*--\]\2\]|.*)/g,sub:"todo"},{expand:"str"},{type:"kwd",match:/\b(and|break|do|else|elseif|end|for|function|if|in|local|not|or|repeat|return|then|until|while)\b/g},{type:"bool",match:/\b(true|false|nil)\b/g},{type:"oper",match:/[+*/%^#=~<>:,.-]+/g},{expand:"num"},{type:"func",match:/[a-z_]+(?=\s*[({])/g}]; 2 | -------------------------------------------------------------------------------- /dist/node/languages/make.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | expand?: undefined; 5 | type?: undefined; 6 | } | { 7 | expand: string; 8 | match?: undefined; 9 | sub?: undefined; 10 | type?: undefined; 11 | } | { 12 | type: string; 13 | match: RegExp; 14 | sub?: undefined; 15 | expand?: undefined; 16 | })[]; 17 | export default _default; 18 | //# sourceMappingURL=make.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/make.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"make.d.ts","sourceRoot":"","sources":["../../../src/languages/make.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/make.js: -------------------------------------------------------------------------------- 1 | var c=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var d=(a,t)=>{for(var m in t)c(a,m,{get:t[m],enumerable:!0})},n=(a,t,m,p)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of h(t))!g.call(a,e)&&e!==m&&c(a,e,{get:()=>t[e],enumerable:!(p=s(t,e))||p.enumerable});return a};var b=a=>n(c({},"__esModule",{value:!0}),a);var y={};d(y,{default:()=>o});module.exports=b(y);var o=[{match:/^\s*#.*/gm,sub:"todo"},{expand:"str"},{type:"oper",match:/[${}()]+/g},{type:"class",match:/.PHONY:/gm},{type:"section",match:/^[\w.]+:/gm},{type:"kwd",match:/\b(ifneq|endif)\b/g},{expand:"num"},{type:"var",match:/[A-Z_]+(?=\s*=)/g},{match:/^.*$/gm,sub:"bash"}]; 2 | -------------------------------------------------------------------------------- /dist/node/languages/md.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | type: string; 3 | match: RegExp; 4 | sub?: undefined; 5 | } | { 6 | match: RegExp; 7 | sub: (code: any) => { 8 | type: string; 9 | sub: { 10 | match: RegExp; 11 | sub: any; 12 | }[]; 13 | }; 14 | type?: undefined; 15 | })[]; 16 | export default _default; 17 | //# sourceMappingURL=md.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/md.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"md.d.ts","sourceRoot":"","sources":["../../../src/languages/md.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/pl.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | type?: undefined; 5 | expand?: undefined; 6 | } | { 7 | type: string; 8 | match: RegExp; 9 | sub?: undefined; 10 | expand?: undefined; 11 | } | { 12 | expand: string; 13 | match?: undefined; 14 | sub?: undefined; 15 | type?: undefined; 16 | })[]; 17 | export default _default; 18 | //# sourceMappingURL=pl.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/pl.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"pl.d.ts","sourceRoot":"","sources":["../../../src/languages/pl.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/pl.js: -------------------------------------------------------------------------------- 1 | var o=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var c=(t,e)=>{for(var n in e)o(t,n,{get:e[n],enumerable:!0})},d=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of s(e))!l.call(t,a)&&a!==n&&o(t,a,{get:()=>e[a],enumerable:!(r=u(e,a))||r.enumerable});return t};var i=t=>d(o({},"__esModule",{value:!0}),t);var p={};c(p,{default:()=>h});module.exports=i(p);var h=[{match:/#.*/g,sub:"todo"},{type:"str",match:/(["'])(\\[^]|(?!\1)[^])*\1?/g},{expand:"num"},{type:"kwd",match:/\b(any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while|not|and|or|xor)\b/g},{type:"oper",match:/[-+*/%~!&<>|=?,]+/g},{type:"func",match:/[a-z_]+(?=\s*\()/g}]; 2 | -------------------------------------------------------------------------------- /dist/node/languages/plain.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: { 2 | expand: string; 3 | }[]; 4 | export default _default; 5 | //# sourceMappingURL=plain.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/plain.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"plain.d.ts","sourceRoot":"","sources":["../../../src/languages/plain.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/plain.js: -------------------------------------------------------------------------------- 1 | var l=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var x=(t,e)=>{for(var d in e)l(t,d,{get:e[d],enumerable:!0})},b=(t,e,d,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of r(e))!u.call(t,a)&&a!==d&&l(t,a,{get:()=>e[a],enumerable:!(o=p(e,a))||o.enumerable});return t};var f=t=>b(l({},"__esModule",{value:!0}),t);var s={};x(s,{default:()=>n});module.exports=f(s);var n=[{expand:"strDouble"}]; 2 | -------------------------------------------------------------------------------- /dist/node/languages/py.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | type?: undefined; 5 | expand?: undefined; 6 | } | { 7 | type: string; 8 | match: RegExp; 9 | sub: { 10 | type: string; 11 | match: RegExp; 12 | sub: { 13 | match: RegExp; 14 | sub: string; 15 | }[]; 16 | }[]; 17 | expand?: undefined; 18 | } | { 19 | expand: string; 20 | match?: undefined; 21 | sub?: undefined; 22 | type?: undefined; 23 | } | { 24 | type: string; 25 | match: RegExp; 26 | sub?: undefined; 27 | expand?: undefined; 28 | })[]; 29 | export default _default; 30 | //# sourceMappingURL=py.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/py.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"py.d.ts","sourceRoot":"","sources":["../../../src/languages/py.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/py.js: -------------------------------------------------------------------------------- 1 | var o=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var p=(a,t)=>{for(var s in t)o(a,s,{get:t[s],enumerable:!0})},m=(a,t,s,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of r(t))!b.call(a,e)&&e!==s&&o(a,e,{get:()=>t[e],enumerable:!(l=c(t,e))||l.enumerable});return a};var n=a=>m(o({},"__esModule",{value:!0}),a);var i={};p(i,{default:()=>h});module.exports=n(i);var h=[{match:/#.*/g,sub:"todo"},{match:/("""|''')(\\[^]|(?!\1)[^])*\1?/g,sub:"todo"},{type:"str",match:/f("|')(\\[^]|(?!\1).)*\1?|f((["'])\4\4)(\\[^]|(?!\3)[^])*\3?/gi,sub:[{type:"var",match:/{[^{}]*}/g,sub:[{match:/(?!^{)[^]*(?=}$)/g,sub:"py"}]}]},{expand:"str"},{type:"kwd",match:/\b(and|as|assert|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|raise|return|try|while|with|yield)\b/g},{type:"bool",match:/\b(False|True|None)\b/g},{expand:"num"},{type:"func",match:/[a-z_]+(?=\s*\()/g},{type:"oper",match:/[-/*+<>,=!&|^%]+/g},{type:"class",match:/\b[A-Z][\w_]*\b/g}]; 2 | -------------------------------------------------------------------------------- /dist/node/languages/regex.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | type?: undefined; 5 | } | { 6 | type: string; 7 | match: RegExp; 8 | sub?: undefined; 9 | })[]; 10 | export default _default; 11 | export let type: string; 12 | //# sourceMappingURL=regex.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/regex.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"regex.d.ts","sourceRoot":"","sources":["../../../src/languages/regex.js"],"names":[],"mappings":";;;;;;;;;;AAkBA,wBAAyB"} -------------------------------------------------------------------------------- /dist/node/languages/regex.js: -------------------------------------------------------------------------------- 1 | var m=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var g=(e,t)=>{for(var a in t)m(e,a,{get:t[a],enumerable:!0})},h=(e,t,a,d)=>{if(t&&typeof t=="object"||typeof t=="function")for(let p of r(t))!c.call(e,p)&&p!==a&&m(e,p,{get:()=>t[p],enumerable:!(d=o(t,p))||d.enumerable});return e};var y=e=>h(m({},"__esModule",{value:!0}),e);var n={};g(n,{default:()=>u,type:()=>l});module.exports=y(n);var u=[{match:/^(?!\/).*/gm,sub:"todo"},{type:"num",match:/\[((?!\])[^\\]|\\.)*\]/g},{type:"kwd",match:/\||\^|\$|\\.|\w+($|\r|\n)/g},{type:"var",match:/\*|\+|\{\d+,\d+\}/g}],l="oper";0&&(module.exports={type}); 2 | -------------------------------------------------------------------------------- /dist/node/languages/rs.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | expand?: undefined; 5 | type?: undefined; 6 | } | { 7 | expand: string; 8 | match?: undefined; 9 | sub?: undefined; 10 | type?: undefined; 11 | } | { 12 | type: string; 13 | match: RegExp; 14 | sub?: undefined; 15 | expand?: undefined; 16 | })[]; 17 | export default _default; 18 | //# sourceMappingURL=rs.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/rs.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"rs.d.ts","sourceRoot":"","sources":["../../../src/languages/rs.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/rs.js: -------------------------------------------------------------------------------- 1 | var s=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var p=(t,e)=>{for(var r in e)s(t,r,{get:e[r],enumerable:!0})},i=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of o(e))!u.call(t,a)&&a!==r&&s(t,a,{get:()=>e[a],enumerable:!(n=c(e,a))||n.enumerable});return t};var m=t=>i(s({},"__esModule",{value:!0}),t);var f={};p(f,{default:()=>l});module.exports=m(f);var l=[{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:"todo"},{expand:"str"},{expand:"num"},{type:"kwd",match:/\b(as|break|const|continue|crate|else|enum|extern|false|fn|for|if|impl|in|let|loop|match|mod|move|mut|pub|ref|return|self|Self|static|struct|super|trait|true|type|unsafe|use|where|while|async|await|dyn|abstract|become|box|do|final|macro|override|priv|typeof|unsized|virtual|yield|try)\b/g},{type:"oper",match:/[/*+:?&|%^~=!,<>.^-]+/g},{type:"class",match:/\b[A-Z][\w_]*\b/g},{type:"func",match:/[a-zA-Z_][\w_]*(?=\s*!?\s*\()/g}]; 2 | -------------------------------------------------------------------------------- /dist/node/languages/sql.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | expand?: undefined; 5 | type?: undefined; 6 | } | { 7 | expand: string; 8 | match?: undefined; 9 | sub?: undefined; 10 | type?: undefined; 11 | } | { 12 | type: string; 13 | match: RegExp; 14 | sub?: undefined; 15 | expand?: undefined; 16 | })[]; 17 | export default _default; 18 | //# sourceMappingURL=sql.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/sql.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"sql.d.ts","sourceRoot":"","sources":["../../../src/languages/sql.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/todo.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: { 2 | type: string; 3 | match: RegExp; 4 | }[]; 5 | export default _default; 6 | export let type: string; 7 | //# sourceMappingURL=todo.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/todo.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"todo.d.ts","sourceRoot":"","sources":["../../../src/languages/todo.js"],"names":[],"mappings":";;;;;AAkBA,wBAAyB"} -------------------------------------------------------------------------------- /dist/node/languages/todo.js: -------------------------------------------------------------------------------- 1 | var E=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var r=Object.prototype.hasOwnProperty;var m=(e,t)=>{for(var p in t)E(e,p,{get:t[p],enumerable:!0})},y=(e,t,p,I)=>{if(t&&typeof t=="object"||typeof t=="function")for(let b of c(t))!r.call(e,b)&&b!==p&&E(e,b,{get:()=>t[b],enumerable:!(I=a(t,b))||I.enumerable});return e};var G=e=>y(E({},"__esModule",{value:!0}),e);var g={};m(g,{default:()=>N,type:()=>X});module.exports=G(g);var N=[{type:"err",match:/\b(TODO|FIXME|DEBUG|OPTIMIZE|WARNING|XXX|BUG)\b/g},{type:"class",match:/\bIDEA\b/g},{type:"insert",match:/\b(CHANGED|FIX|CHANGE)\b/g},{type:"oper",match:/\bQUESTION\b/g}],X="cmnt";0&&(module.exports={type}); 2 | -------------------------------------------------------------------------------- /dist/node/languages/toml.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | type?: undefined; 5 | expand?: undefined; 6 | } | { 7 | type: string; 8 | match: RegExp; 9 | sub?: undefined; 10 | expand?: undefined; 11 | } | { 12 | expand: string; 13 | match?: undefined; 14 | sub?: undefined; 15 | type?: undefined; 16 | })[]; 17 | export default _default; 18 | //# sourceMappingURL=toml.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/toml.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"toml.d.ts","sourceRoot":"","sources":["../../../src/languages/toml.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/toml.js: -------------------------------------------------------------------------------- 1 | var p=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var o=(e,t)=>{for(var m in t)p(e,m,{get:t[m],enumerable:!0})},b=(e,t,m,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of g(t))!h.call(e,a)&&a!==m&&p(e,a,{get:()=>t[a],enumerable:!(c=n(t,a))||c.enumerable});return e};var d=e=>b(p({},"__esModule",{value:!0}),e);var s={};o(s,{default:()=>r});module.exports=d(s);var r=[{match:/#.*/g,sub:"todo"},{type:"str",match:/("""|''')((?!\1)[^]|\\[^])*\1?/g},{expand:"str"},{type:"section",match:/^\[.+\]\s*$/gm},{type:"num",match:/\b(inf|nan)\b|\d[\d:ZT.-]*/g},{expand:"num"},{type:"bool",match:/\b(true|false)\b/g},{type:"oper",match:/[+,.=-]/g},{type:"var",match:/\w+(?= \=)/g}]; 2 | -------------------------------------------------------------------------------- /dist/node/languages/ts.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | expand?: undefined; 5 | type?: undefined; 6 | } | { 7 | expand: string; 8 | match?: undefined; 9 | sub?: undefined; 10 | type?: undefined; 11 | } | { 12 | type: string; 13 | match: RegExp; 14 | sub?: undefined; 15 | expand?: undefined; 16 | })[]; 17 | export default _default; 18 | //# sourceMappingURL=ts.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/ts.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"ts.d.ts","sourceRoot":"","sources":["../../../src/languages/ts.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/ts.js: -------------------------------------------------------------------------------- 1 | var n=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var m=(t,e)=>{for(var c in e)n(t,c,{get:e[c],enumerable:!0})},l=(t,e,c,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of p(e))!i.call(t,a)&&a!==c&&n(t,a,{get:()=>e[a],enumerable:!(s=o(e,a))||s.enumerable});return t};var u=t=>l(n({},"__esModule",{value:!0}),t);var d={};m(d,{default:()=>b});module.exports=u(d);var r=[{match:/\/\*\*((?!\*\/)[^])*(\*\/)?/g,sub:"jsdoc"},{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:"todo"},{expand:"str"},{match:/`((?!`)[^]|\\[^])*`?/g,sub:"js_template_literals"},{type:"kwd",match:/=>|\b(this|set|get|as|async|await|break|case|catch|class|const|constructor|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|if|implements|import|in|instanceof|interface|let|var|of|new|package|private|protected|public|return|static|super|switch|throw|throws|try|typeof|void|while|with|yield)\b/g},{match:/\/((?!\/)[^\r\n\\]|\\.)+\/[dgimsuy]*/g,sub:"regex"},{expand:"num"},{type:"num",match:/\b(NaN|null|undefined|[A-Z][A-Z_]*)\b/g},{type:"bool",match:/\b(true|false)\b/g},{type:"oper",match:/[/*+:?&|%^~=!,<>.^-]+/g},{type:"class",match:/\b[A-Z][\w_]*\b/g},{type:"func",match:/[a-zA-Z$_][\w$_]*(?=\s*((\?\.)?\s*\(|=\s*(\(?[\w,{}\[\])]+\)? =>|function\b)))/g}];var b=[{type:"type",match:/:\s*(any|void|number|boolean|string|object|never|enum)\b/g},{type:"kwd",match:/\b(type|namespace|typedef|interface|public|private|protected|implements|declare|abstract|readonly)\b/g},...r]; 2 | -------------------------------------------------------------------------------- /dist/node/languages/uri.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | type?: undefined; 5 | } | { 6 | type: string; 7 | match: RegExp; 8 | sub?: undefined; 9 | })[]; 10 | export default _default; 11 | //# sourceMappingURL=uri.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/uri.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"uri.d.ts","sourceRoot":"","sources":["../../../src/languages/uri.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/uri.js: -------------------------------------------------------------------------------- 1 | var e=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var y=(m,t)=>{for(var c in t)e(m,c,{get:t[c],enumerable:!0})},o=(m,t,c,p)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of g(t))!h.call(m,a)&&a!==c&&e(m,a,{get:()=>t[a],enumerable:!(p=w(t,a))||p.enumerable});return m};var u=m=>o(e({},"__esModule",{value:!0}),m);var r={};y(r,{default:()=>d});module.exports=u(r);var d=[{match:/^#.*/gm,sub:"todo"},{type:"class",match:/^\w+(?=:?)/gm},{type:"num",match:/:\d+/g},{type:"oper",match:/[:/&?]|\w+=/g},{type:"func",match:/[.\w]+@|#[\w]+$/gm},{type:"var",match:/\w+\.\w+(\.\w+)*/g}]; 2 | -------------------------------------------------------------------------------- /dist/node/languages/xml.d.ts: -------------------------------------------------------------------------------- 1 | export let name: string; 2 | export let properties: string; 3 | export namespace xmlElement { 4 | let match: RegExp; 5 | let sub: ({ 6 | type: string; 7 | match: RegExp; 8 | sub: { 9 | type: string; 10 | match: RegExp; 11 | }[]; 12 | } | { 13 | type: string; 14 | match: RegExp; 15 | sub?: undefined; 16 | })[]; 17 | } 18 | declare const _default: ({ 19 | match: RegExp; 20 | sub: ({ 21 | type: string; 22 | match: RegExp; 23 | sub: { 24 | type: string; 25 | match: RegExp; 26 | }[]; 27 | } | { 28 | type: string; 29 | match: RegExp; 30 | sub?: undefined; 31 | })[]; 32 | } | { 33 | match: RegExp; 34 | sub: string; 35 | type?: undefined; 36 | } | { 37 | type: string; 38 | match: RegExp; 39 | sub?: undefined; 40 | })[]; 41 | export default _default; 42 | //# sourceMappingURL=xml.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/xml.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"xml.d.ts","sourceRoot":"","sources":["../../../src/languages/xml.js"],"names":[],"mappings":"AAIC,wBAAyC;AACzC,8BAA4F"} -------------------------------------------------------------------------------- /dist/node/languages/xml.js: -------------------------------------------------------------------------------- 1 | var F=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var o=(e,t)=>{for(var p in t)F(e,p,{get:t[p],enumerable:!0})},x=(e,t,p,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of h(t))!y.call(e,a)&&a!==p&&F(e,a,{get:()=>t[a],enumerable:!(s=c(t,a))||s.enumerable});return e};var D=e=>x(F({},"__esModule",{value:!0}),e);var C={};o(C,{default:()=>l,name:()=>u,properties:()=>m,xmlElement:()=>r});module.exports=D(C);var g=":A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD",$=g+"\\-\\.0-9\xB7\u0300-\u036F\u203F-\u2040",u=`[${g}][${$}]*`,m=`\\s*(\\s+${u}\\s*(=\\s*([^"']\\S*|("|')(\\\\[^]|(?!\\4)[^])*\\4?)?)?\\s*)*`,r={match:RegExp(`<[/!?]?${u}${m}[/!?]?>`,"g"),sub:[{type:"var",match:RegExp(`^<[/!?]?${u}`,"g"),sub:[{type:"oper",match:/^<[\/!?]?/g}]},{type:"str",match:/=\s*([^"']\S*|("|')(\\[^]|(?!\2)[^])*\2?)/g,sub:[{type:"oper",match:/^=/g}]},{type:"oper",match:/[\/!?]?>/g},{type:"class",match:RegExp(u,"g")}]},l=[{match:/)[^])*-->/g,sub:"todo"},{type:"class",match://gi},r,{type:"str",match:RegExp(`<\\?${u}([^?]|\\?[^?>])*\\?+>`,"g"),sub:[{type:"var",match:RegExp(`^<\\?${u}`,"g"),sub:[{type:"oper",match:/^<\?/g}]},{type:"oper",match:/\?+>$/g}]},{type:"var",match:/&(#x?)?[\da-z]{1,8};/gi}];0&&(module.exports={name,properties,xmlElement}); 2 | -------------------------------------------------------------------------------- /dist/node/languages/yaml.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: ({ 2 | match: RegExp; 3 | sub: string; 4 | expand?: undefined; 5 | type?: undefined; 6 | } | { 7 | expand: string; 8 | match?: undefined; 9 | sub?: undefined; 10 | type?: undefined; 11 | } | { 12 | type: string; 13 | match: RegExp; 14 | sub?: undefined; 15 | expand?: undefined; 16 | })[]; 17 | export default _default; 18 | //# sourceMappingURL=yaml.d.ts.map -------------------------------------------------------------------------------- /dist/node/languages/yaml.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"yaml.d.ts","sourceRoot":"","sources":["../../../src/languages/yaml.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/languages/yaml.js: -------------------------------------------------------------------------------- 1 | var m=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var h=(a,t)=>{for(var p in t)m(a,p,{get:t[p],enumerable:!0})},n=(a,t,p,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of c(t))!g.call(a,e)&&e!==p&&m(a,e,{get:()=>t[e],enumerable:!(o=r(t,e))||o.enumerable});return a};var y=a=>n(m({},"__esModule",{value:!0}),a);var b={};h(b,{default:()=>s});module.exports=y(b);var s=[{match:/#.*/g,sub:"todo"},{expand:"str"},{type:"str",match:/(>|\|)\r?\n((\s[^\n]*)?(\r?\n|$))*/g},{type:"type",match:/!![a-z]+/g},{type:"bool",match:/\b(Yes|No)\b/g},{type:"oper",match:/[+:-]/g},{expand:"num"},{type:"var",match:/[a-zA-Z]\w*(?=:)/g}]; 2 | -------------------------------------------------------------------------------- /dist/node/package.json: -------------------------------------------------------------------------------- 1 | {"type": "commonjs"} 2 | -------------------------------------------------------------------------------- /dist/node/terminal.d.ts: -------------------------------------------------------------------------------- 1 | export function highlightText(src: string, lang: ShjLanguage): Promise; 2 | export function printHighlight(src: string, lang: ShjLanguage): Promise; 3 | export function setTheme(name: ShjTerminalTheme): Promise; 4 | export type ShjLanguage = import("./index.js").ShjLanguage; 5 | /** 6 | * Languages supported 7 | */ 8 | export type ShjTerminalTheme = ("default" | "atom-dark"); 9 | //# sourceMappingURL=terminal.d.ts.map -------------------------------------------------------------------------------- /dist/node/terminal.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"terminal.d.ts","sourceRoot":"","sources":["../../src/terminal.js"],"names":[],"mappings":"AA2BO,mCAJI,MAAM,QACN,WAAW,GACT,OAAO,CAAC,MAAM,CAAC,CAQ3B;AAUM,oCAHI,MAAM,QACN,WAAW,gBAEwE;AAQvF,+BAFI,gBAAgB,gBAEgD;0BA7C9D,OAAO,YAAY,EAAE,WAAW;;;;+BAKhC,CAAC,SAAS,GAAC,WAAW,CAAC"} -------------------------------------------------------------------------------- /dist/node/themes/atom-dark.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace _default { 2 | export let deleted: string; 3 | let _var: string; 4 | export { _var as var }; 5 | export let err: string; 6 | export let kwd: string; 7 | export let num: string; 8 | let _class: string; 9 | export { _class as class }; 10 | export let cmnt: string; 11 | export let insert: string; 12 | export let str: string; 13 | export let bool: string; 14 | export let type: string; 15 | export let oper: string; 16 | export let section: string; 17 | export let func: string; 18 | } 19 | export default _default; 20 | //# sourceMappingURL=atom-dark.d.ts.map -------------------------------------------------------------------------------- /dist/node/themes/atom-dark.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"atom-dark.d.ts","sourceRoot":"","sources":["../../../src/themes/atom-dark.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/themes/atom-dark.js: -------------------------------------------------------------------------------- 1 | var b=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var d=(l,r)=>{for(var a in r)b(l,a,{get:r[a],enumerable:!0})},c=(l,r,a,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let m of o(r))!x.call(l,m)&&m!==a&&b(l,m,{get:()=>r[m],enumerable:!(t=n(r,m))||t.enumerable});return l};var g=l=>c(b({},"__esModule",{value:!0}),l);var y={};d(y,{default:()=>u});module.exports=g(y);var e={black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",gray:"\x1B[90m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m"};var u={deleted:e.red,var:e.red,err:e.red,kwd:e.magenta,num:e.yellow,class:e.yellow,cmnt:e.gray,insert:e.green,str:e.green,bool:e.cyan,type:e.blue,oper:e.blue,section:e.magenta,func:e.blue}; 2 | -------------------------------------------------------------------------------- /dist/node/themes/default.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace _default { 2 | export let deleted: string; 3 | let _var: string; 4 | export { _var as var }; 5 | export let err: string; 6 | export let kwd: string; 7 | export let num: string; 8 | let _class: string; 9 | export { _class as class }; 10 | export let cmnt: string; 11 | export let insert: string; 12 | export let str: string; 13 | export let bool: string; 14 | export let type: string; 15 | export let oper: string; 16 | export let section: string; 17 | export let func: string; 18 | } 19 | export default _default; 20 | //# sourceMappingURL=default.d.ts.map -------------------------------------------------------------------------------- /dist/node/themes/default.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/themes/default.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/themes/default.js: -------------------------------------------------------------------------------- 1 | var t=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var d=(l,r)=>{for(var a in r)t(l,a,{get:r[a],enumerable:!0})},c=(l,r,a,b)=>{if(r&&typeof r=="object"||typeof r=="function")for(let m of o(r))!x.call(l,m)&&m!==a&&t(l,m,{get:()=>r[m],enumerable:!(b=n(r,m))||b.enumerable});return l};var g=l=>c(t({},"__esModule",{value:!0}),l);var u={};d(u,{default:()=>y});module.exports=g(u);var e={black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",gray:"\x1B[90m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m"};var y={deleted:e.red,var:e.red,err:e.red,kwd:e.red,num:e.yellow,class:e.yellow,cmnt:e.gray,insert:e.green,str:e.green,bool:e.cyan,type:e.blue,oper:e.blue,section:e.magenta,func:e.magenta}; 2 | -------------------------------------------------------------------------------- /dist/node/themes/termcolor.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace _default { 2 | let black: string; 3 | let red: string; 4 | let green: string; 5 | let gray: string; 6 | let yellow: string; 7 | let blue: string; 8 | let magenta: string; 9 | let cyan: string; 10 | let white: string; 11 | } 12 | export default _default; 13 | //# sourceMappingURL=termcolor.d.ts.map -------------------------------------------------------------------------------- /dist/node/themes/termcolor.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"termcolor.d.ts","sourceRoot":"","sources":["../../../src/themes/termcolor.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/node/themes/termcolor.js: -------------------------------------------------------------------------------- 1 | var a=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var t=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var n=(m,b)=>{for(var e in b)a(m,e,{get:b[e],enumerable:!0})},y=(m,b,e,l)=>{if(b&&typeof b=="object"||typeof b=="function")for(let x of t(b))!g.call(m,x)&&x!==e&&a(m,x,{get:()=>b[x],enumerable:!(l=r(b,x))||l.enumerable});return m};var c=m=>y(a({},"__esModule",{value:!0}),m);var o={};n(o,{default:()=>d});module.exports=c(o);var d={black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",gray:"\x1B[90m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m"}; 2 | -------------------------------------------------------------------------------- /dist/terminal.d.ts: -------------------------------------------------------------------------------- 1 | export function highlightText(src: string, lang: ShjLanguage): Promise; 2 | export function printHighlight(src: string, lang: ShjLanguage): Promise; 3 | export function setTheme(name: ShjTerminalTheme): Promise; 4 | export type ShjLanguage = import("./index.js").ShjLanguage; 5 | /** 6 | * Languages supported 7 | */ 8 | export type ShjTerminalTheme = ("default" | "atom-dark"); 9 | //# sourceMappingURL=terminal.d.ts.map -------------------------------------------------------------------------------- /dist/terminal.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"terminal.d.ts","sourceRoot":"","sources":["../src/terminal.js"],"names":[],"mappings":"AA2BO,mCAJI,MAAM,QACN,WAAW,GACT,OAAO,CAAC,MAAM,CAAC,CAQ3B;AAUM,oCAHI,MAAM,QACN,WAAW,gBAEwE;AAQvF,+BAFI,gBAAgB,gBAEgD;0BA7C9D,OAAO,YAAY,EAAE,WAAW;;;;+BAKhC,CAAC,SAAS,GAAC,WAAW,CAAC"} -------------------------------------------------------------------------------- /dist/themes/atom-dark.css: -------------------------------------------------------------------------------- 1 | [class*=shj-lang-]{white-space:pre;color:#112;text-shadow:none;box-sizing:border-box;background:#fff;border-radius:10px;max-width:min(100%,100vw);margin:10px 0;padding:30px 20px;font:18px/24px Consolas,Courier New,Monaco,Andale Mono,Ubuntu Mono,monospace;box-shadow:0 0 5px #0001}.shj-inline{border-radius:5px;margin:0;padding:2px 5px;display:inline-block}[class*=shj-lang-]::selection{background:#bdf5}[class*=shj-lang-] ::selection{background:#bdf5}[class*=shj-lang-]>div{display:flex;overflow:auto}[class*=shj-lang-]>div :last-child{outline:none;flex:1}.shj-numbers{counter-reset:line;padding-left:5px}.shj-numbers div{padding-right:5px}.shj-numbers div:before{color:#999;content:counter(line);opacity:.5;text-align:right;counter-increment:line;margin-right:5px;display:block}.shj-syn-cmnt{font-style:italic}.shj-syn-err,.shj-syn-kwd{color:#e16}.shj-syn-num,.shj-syn-class{color:#f60}.shj-syn-insert,.shj-syn-str{color:#7d8}.shj-syn-bool{color:#3bf}.shj-syn-type,.shj-syn-oper{color:#5af}.shj-syn-section,.shj-syn-func{color:#84f}.shj-syn-deleted,.shj-syn-var{color:#f44}.shj-oneline{padding:12px 10px}.shj-lang-http.shj-oneline .shj-syn-kwd{color:#fff;background:#25f;border-radius:5px;padding:5px 7px}[class*=shj-lang-]{color:#abb2bf;background:#161b22}[class*=shj-lang-]:before{color:#6f9aff}.shj-syn-deleted,.shj-syn-err,.shj-syn-var{color:#e06c75}.shj-syn-section,.shj-syn-oper,.shj-syn-kwd{color:#c678dd}.shj-syn-class{color:#e5c07b}.shj-numbers,.shj-syn-cmnt{color:#76839a}.shj-syn-insert{color:#98c379}.shj-syn-type{color:#56b6c2}.shj-syn-num,.shj-syn-bool{color:#d19a66}.shj-syn-str,.shj-syn-func{color:#61afef} -------------------------------------------------------------------------------- /dist/themes/atom-dark.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace _default { 2 | export let deleted: string; 3 | let _var: string; 4 | export { _var as var }; 5 | export let err: string; 6 | export let kwd: string; 7 | export let num: string; 8 | let _class: string; 9 | export { _class as class }; 10 | export let cmnt: string; 11 | export let insert: string; 12 | export let str: string; 13 | export let bool: string; 14 | export let type: string; 15 | export let oper: string; 16 | export let section: string; 17 | export let func: string; 18 | } 19 | export default _default; 20 | //# sourceMappingURL=atom-dark.d.ts.map -------------------------------------------------------------------------------- /dist/themes/atom-dark.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"atom-dark.d.ts","sourceRoot":"","sources":["../../src/themes/atom-dark.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/themes/atom-dark.js: -------------------------------------------------------------------------------- 1 | var e={black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",gray:"\x1B[90m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m"};var m={deleted:e.red,var:e.red,err:e.red,kwd:e.magenta,num:e.yellow,class:e.yellow,cmnt:e.gray,insert:e.green,str:e.green,bool:e.cyan,type:e.blue,oper:e.blue,section:e.magenta,func:e.blue};export{m as default}; 2 | -------------------------------------------------------------------------------- /dist/themes/dark.css: -------------------------------------------------------------------------------- 1 | [class*=shj-lang-]{white-space:pre;color:#112;text-shadow:none;box-sizing:border-box;background:#fff;border-radius:10px;max-width:min(100%,100vw);margin:10px 0;padding:30px 20px;font:18px/24px Consolas,Courier New,Monaco,Andale Mono,Ubuntu Mono,monospace;box-shadow:0 0 5px #0001}.shj-inline{border-radius:5px;margin:0;padding:2px 5px;display:inline-block}[class*=shj-lang-]::selection{background:#bdf5}[class*=shj-lang-] ::selection{background:#bdf5}[class*=shj-lang-]>div{display:flex;overflow:auto}[class*=shj-lang-]>div :last-child{outline:none;flex:1}.shj-numbers{counter-reset:line;padding-left:5px}.shj-numbers div{padding-right:5px}.shj-numbers div:before{color:#999;content:counter(line);opacity:.5;text-align:right;counter-increment:line;margin-right:5px;display:block}.shj-syn-cmnt{font-style:italic}.shj-syn-err,.shj-syn-kwd{color:#e16}.shj-syn-num,.shj-syn-class{color:#f60}.shj-syn-insert,.shj-syn-str{color:#7d8}.shj-syn-bool{color:#3bf}.shj-syn-type,.shj-syn-oper{color:#5af}.shj-syn-section,.shj-syn-func{color:#84f}.shj-syn-deleted,.shj-syn-var{color:#f44}.shj-oneline{padding:12px 10px}.shj-lang-http.shj-oneline .shj-syn-kwd{color:#fff;background:#25f;border-radius:5px;padding:5px 7px}[class*=shj-lang-]{color:#f8f8f2;background:#1a1a1c}[class*=shj-lang-]:before{color:#6f9aff}.shj-syn-deleted,.shj-syn-err,.shj-syn-var{color:#ff5261}.shj-syn-section,.shj-syn-kwd{color:#ff7cc6}.shj-syn-class{color:#eab07c}.shj-numbers,.shj-syn-cmnt{color:#7d828b}.shj-syn-insert,.shj-syn-type,.shj-syn-func,.shj-syn-bool{color:#71d58a}.shj-syn-num{color:#b581fd}.shj-syn-oper{color:#80c6ff}.shj-syn-str{color:#4dacfa} -------------------------------------------------------------------------------- /dist/themes/default.css: -------------------------------------------------------------------------------- 1 | [class*=shj-lang-]{white-space:pre;color:#112;text-shadow:none;box-sizing:border-box;background:#fff;border-radius:10px;max-width:min(100%,100vw);margin:10px 0;padding:30px 20px;font:18px/24px Consolas,Courier New,Monaco,Andale Mono,Ubuntu Mono,monospace;box-shadow:0 0 5px #0001}.shj-inline{border-radius:5px;margin:0;padding:2px 5px;display:inline-block}[class*=shj-lang-]::selection{background:#bdf5}[class*=shj-lang-] ::selection{background:#bdf5}[class*=shj-lang-]>div{display:flex;overflow:auto}[class*=shj-lang-]>div :last-child{outline:none;flex:1}.shj-numbers{counter-reset:line;padding-left:5px}.shj-numbers div{padding-right:5px}.shj-numbers div:before{color:#999;content:counter(line);opacity:.5;text-align:right;counter-increment:line;margin-right:5px;display:block}.shj-syn-cmnt{font-style:italic}.shj-syn-err,.shj-syn-kwd{color:#e16}.shj-syn-num,.shj-syn-class{color:#f60}.shj-numbers,.shj-syn-cmnt{color:#999}.shj-syn-insert,.shj-syn-str{color:#7d8}.shj-syn-bool{color:#3bf}.shj-syn-type,.shj-syn-oper{color:#5af}.shj-syn-section,.shj-syn-func{color:#84f}.shj-syn-deleted,.shj-syn-var{color:#f44}.shj-oneline{padding:12px 10px}.shj-lang-http.shj-oneline .shj-syn-kwd{color:#fff;background:#25f;border-radius:5px;padding:5px 7px} -------------------------------------------------------------------------------- /dist/themes/default.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace _default { 2 | export let deleted: string; 3 | let _var: string; 4 | export { _var as var }; 5 | export let err: string; 6 | export let kwd: string; 7 | export let num: string; 8 | let _class: string; 9 | export { _class as class }; 10 | export let cmnt: string; 11 | export let insert: string; 12 | export let str: string; 13 | export let bool: string; 14 | export let type: string; 15 | export let oper: string; 16 | export let section: string; 17 | export let func: string; 18 | } 19 | export default _default; 20 | //# sourceMappingURL=default.d.ts.map -------------------------------------------------------------------------------- /dist/themes/default.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../src/themes/default.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/themes/default.js: -------------------------------------------------------------------------------- 1 | var e={black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",gray:"\x1B[90m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m"};var m={deleted:e.red,var:e.red,err:e.red,kwd:e.red,num:e.yellow,class:e.yellow,cmnt:e.gray,insert:e.green,str:e.green,bool:e.cyan,type:e.blue,oper:e.blue,section:e.magenta,func:e.magenta};export{m as default}; 2 | -------------------------------------------------------------------------------- /dist/themes/github-dark.css: -------------------------------------------------------------------------------- 1 | [class*=shj-lang-]{white-space:pre;color:#112;text-shadow:none;box-sizing:border-box;background:#fff;border-radius:10px;max-width:min(100%,100vw);margin:10px 0;padding:30px 20px;font:18px/24px Consolas,Courier New,Monaco,Andale Mono,Ubuntu Mono,monospace;box-shadow:0 0 5px #0001}.shj-inline{border-radius:5px;margin:0;padding:2px 5px;display:inline-block}[class*=shj-lang-]::selection{background:#bdf5}[class*=shj-lang-] ::selection{background:#bdf5}[class*=shj-lang-]>div{display:flex;overflow:auto}[class*=shj-lang-]>div :last-child{outline:none;flex:1}.shj-numbers{counter-reset:line;padding-left:5px}.shj-numbers div{padding-right:5px}.shj-numbers div:before{color:#999;content:counter(line);opacity:.5;text-align:right;counter-increment:line;margin-right:5px;display:block}.shj-syn-cmnt{font-style:italic}.shj-syn-err,.shj-syn-kwd{color:#e16}.shj-syn-num,.shj-syn-class{color:#f60}.shj-syn-insert,.shj-syn-str{color:#7d8}.shj-syn-bool{color:#3bf}.shj-syn-type,.shj-syn-oper{color:#5af}.shj-syn-section,.shj-syn-func{color:#84f}.shj-syn-deleted,.shj-syn-var{color:#f44}.shj-oneline{padding:12px 10px}.shj-lang-http.shj-oneline .shj-syn-kwd{color:#fff;background:#25f;border-radius:5px;padding:5px 7px}[class*=shj-lang-]{color:#c9d1d9;background:#161b22}[class*=shj-lang-]:before{color:#6f9aff}.shj-syn-insert{color:#98c379}.shj-syn-deleted,.shj-syn-err,.shj-syn-kwd{color:#ff7b72}.shj-syn-class{color:#ffa657}.shj-numbers,.shj-syn-cmnt{color:#8b949e}.shj-syn-type,.shj-syn-oper,.shj-syn-num,.shj-syn-section,.shj-syn-var,.shj-syn-bool{color:#79c0ff}.shj-syn-str{color:#a5d6ff}.shj-syn-func{color:#d2a8ff} -------------------------------------------------------------------------------- /dist/themes/github-dim.css: -------------------------------------------------------------------------------- 1 | [class*=shj-lang-]{white-space:pre;color:#112;text-shadow:none;box-sizing:border-box;background:#fff;border-radius:10px;max-width:min(100%,100vw);margin:10px 0;padding:30px 20px;font:18px/24px Consolas,Courier New,Monaco,Andale Mono,Ubuntu Mono,monospace;box-shadow:0 0 5px #0001}.shj-inline{border-radius:5px;margin:0;padding:2px 5px;display:inline-block}[class*=shj-lang-]::selection{background:#bdf5}[class*=shj-lang-] ::selection{background:#bdf5}[class*=shj-lang-]>div{display:flex;overflow:auto}[class*=shj-lang-]>div :last-child{outline:none;flex:1}.shj-numbers{counter-reset:line;padding-left:5px}.shj-numbers div{padding-right:5px}.shj-numbers div:before{color:#999;content:counter(line);opacity:.5;text-align:right;counter-increment:line;margin-right:5px;display:block}.shj-syn-cmnt{font-style:italic}.shj-syn-err,.shj-syn-kwd{color:#e16}.shj-syn-num,.shj-syn-class{color:#f60}.shj-syn-insert,.shj-syn-str{color:#7d8}.shj-syn-bool{color:#3bf}.shj-syn-type,.shj-syn-oper{color:#5af}.shj-syn-section,.shj-syn-func{color:#84f}.shj-syn-deleted,.shj-syn-var{color:#f44}.shj-oneline{padding:12px 10px}.shj-lang-http.shj-oneline .shj-syn-kwd{color:#fff;background:#25f;border-radius:5px;padding:5px 7px}[class*=shj-lang-]{color:#c9d1d9;background:#161b22}[class*=shj-lang-]:before{color:#6f9aff}.shj-syn-insert{color:#98c379}.shj-syn-deleted,.shj-syn-err,.shj-syn-kwd{color:#ff7b72}.shj-syn-class{color:#ffa657}.shj-numbers,.shj-syn-cmnt{color:#8b949e}.shj-syn-type,.shj-syn-oper,.shj-syn-num,.shj-syn-section,.shj-syn-var,.shj-syn-bool{color:#79c0ff}.shj-syn-str{color:#a5d6ff}.shj-syn-func{color:#d2a8ff}[class*=shj-lang-]{background:#22272e} -------------------------------------------------------------------------------- /dist/themes/github-light.css: -------------------------------------------------------------------------------- 1 | [class*=shj-lang-]{white-space:pre;color:#112;text-shadow:none;box-sizing:border-box;background:#fff;border-radius:10px;max-width:min(100%,100vw);margin:10px 0;padding:30px 20px;font:18px/24px Consolas,Courier New,Monaco,Andale Mono,Ubuntu Mono,monospace;box-shadow:0 0 5px #0001}.shj-inline{border-radius:5px;margin:0;padding:2px 5px;display:inline-block}[class*=shj-lang-]::selection{background:#bdf5}[class*=shj-lang-] ::selection{background:#bdf5}[class*=shj-lang-]>div{display:flex;overflow:auto}[class*=shj-lang-]>div :last-child{outline:none;flex:1}.shj-numbers{counter-reset:line;padding-left:5px}.shj-numbers div{padding-right:5px}.shj-numbers div:before{color:#999;content:counter(line);opacity:.5;text-align:right;counter-increment:line;margin-right:5px;display:block}.shj-syn-cmnt{font-style:italic}.shj-syn-err,.shj-syn-kwd{color:#e16}.shj-syn-num,.shj-syn-class{color:#f60}.shj-syn-insert,.shj-syn-str{color:#7d8}.shj-syn-bool{color:#3bf}.shj-syn-type,.shj-syn-oper{color:#5af}.shj-syn-section,.shj-syn-func{color:#84f}.shj-syn-deleted,.shj-syn-var{color:#f44}.shj-oneline{padding:12px 10px}.shj-lang-http.shj-oneline .shj-syn-kwd{color:#fff;background:#25f;border-radius:5px;padding:5px 7px}[class*=shj-lang-]{color:#24292f;background:#fff}.shj-syn-deleted,.shj-syn-err,.shj-syn-kwd{color:#cf222e}.shj-syn-class{color:#953800}.shj-numbers,.shj-syn-cmnt{color:#6e7781}.shj-syn-type,.shj-syn-oper,.shj-syn-num,.shj-syn-section,.shj-syn-var,.shj-syn-bool{color:#0550ae}.shj-syn-str{color:#0a3069}.shj-syn-func{color:#8250df} -------------------------------------------------------------------------------- /dist/themes/termcolor.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace _default { 2 | let black: string; 3 | let red: string; 4 | let green: string; 5 | let gray: string; 6 | let yellow: string; 7 | let blue: string; 8 | let magenta: string; 9 | let cyan: string; 10 | let white: string; 11 | } 12 | export default _default; 13 | //# sourceMappingURL=termcolor.d.ts.map -------------------------------------------------------------------------------- /dist/themes/termcolor.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"termcolor.d.ts","sourceRoot":"","sources":["../../src/themes/termcolor.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/themes/termcolor.js: -------------------------------------------------------------------------------- 1 | var b={black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",gray:"\x1B[90m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m"};export{b as default}; 2 | -------------------------------------------------------------------------------- /dist/themes/visual-studio-dark.css: -------------------------------------------------------------------------------- 1 | [class*=shj-lang-]{white-space:pre;color:#112;text-shadow:none;box-sizing:border-box;background:#fff;border-radius:10px;max-width:min(100%,100vw);margin:10px 0;padding:30px 20px;font:18px/24px Consolas,Courier New,Monaco,Andale Mono,Ubuntu Mono,monospace;box-shadow:0 0 5px #0001}.shj-inline{border-radius:5px;margin:0;padding:2px 5px;display:inline-block}[class*=shj-lang-]::selection{background:#bdf5}[class*=shj-lang-] ::selection{background:#bdf5}[class*=shj-lang-]>div{display:flex;overflow:auto}[class*=shj-lang-]>div :last-child{outline:none;flex:1}.shj-numbers{counter-reset:line;padding-left:5px}.shj-numbers div{padding-right:5px}.shj-numbers div:before{color:#999;content:counter(line);opacity:.5;text-align:right;counter-increment:line;margin-right:5px;display:block}.shj-syn-cmnt{font-style:italic}.shj-syn-err,.shj-syn-kwd{color:#e16}.shj-syn-num,.shj-syn-class{color:#f60}.shj-syn-insert,.shj-syn-str{color:#7d8}.shj-syn-type,.shj-syn-oper{color:#5af}.shj-syn-section,.shj-syn-func{color:#84f}.shj-syn-deleted,.shj-syn-var{color:#f44}.shj-oneline{padding:12px 10px}.shj-lang-http.shj-oneline .shj-syn-kwd{color:#fff;background:#25f;border-radius:5px;padding:5px 7px}[class*=shj-lang-]{color:#d4d4d4;background:#1e1e1e}[class*=shj-lang-]:before{color:#6f9aff}.shj-syn-insert{color:#98c379}.shj-syn-var{color:#9cdcfe}.shj-syn-oper{color:#d4d4d4}.shj-syn-num,.shj-syn-kwd{color:#569cd6}.shj-syn-section,.shj-syn-type,.shj-syn-class{color:#4fc1ff}.shj-numbers,.shj-syn-cmnt{color:#6a9955}.shj-syn-bool{color:#b5cea8}.shj-syn-deleted,.shj-syn-err,.shj-syn-str{color:#ce9178}.shj-syn-func{color:#dcdcaa} -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- 1 | TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. -------------------------------------------------------------------------------- /docs/assets/hierarchy.js: -------------------------------------------------------------------------------- 1 | window.hierarchyData = "eJyrVirKzy8pVrKKjtVRKkpNy0lNLsnMzytWsqqurQUAmx4Kpg==" -------------------------------------------------------------------------------- /docs/assets/navigation.js: -------------------------------------------------------------------------------- 1 | window.navigationData = "eJyd1M9vgjAUB/D/pbuSTR26yM3NJTts2UFuxgOhT1otLYFnplv83xdUoPwq3Y6Ubz7p62vf+ocgHJF4hAJCiMQhSYCMeCRW9CAge7iu3zOMBXHInktKvIlDQsYFTUESb90g3gMZHYIIKmp7kCFyJUusHqzbM/fslOKK7dpcx87uMrYTVfAqueO5+zhyzxsN5JLCsU1dlq1qXLHdZ3IpplK4REi3QVhCVahhTmf14p5T9ZVB6jOItQLxlOiUHmp4o/nTeDqpm0ueJSI4fSjaT2oZC7HdggbX3Umj9aLiREmQOIiWyT/oS9hyyfMODPJV1ML31R76ycvfIYXxiAkeMVwI0fVEbldRSxneRxl7FRDXDrMXvCVtUD//HhbzmIETKqCmmXDV9JQBw/yI+bcBKhItRB8DCGnMZSDak6D4YzsM/Fu+8wmXWDNofUn6WlBt07ILScolvhVhI1mPGswMsFF2h1aE/jvlaw0ZmPObX0x+V/Q=" -------------------------------------------------------------------------------- /docs/assets/search.js: -------------------------------------------------------------------------------- 1 | window.searchData = "eJytmFuP2zYQhf/L5JVwPNTFlt7apkALpO1DF30RjEKxuCttdDEkOU1q+L8X1I1Dk3bodZ9sSHPOocjPI9InaJt/OoiTE3wu6gxizqBOKwExZKIX+x4YHNsSYqia7FiK7v14eZX3VQkM9mXadaKDGODMZo/QvzD5mNYvx/RFLGbPx3rfF0292Ol1FncGh7QVda8GpvJ8jHxvrUL/zF+NRMvw33X5a6nqHMPUBBV1Jr4aAcPVm9PDg5AO9Y/DMBOLUVH3on1O94uXqrk9L+N4VA6uuZqTvMjEx6IWvx+rT6J1T3snhWVRi3oR3kgnavrA62iDAacP/aPETrRPuajUGvXfDnQYtOa+J7cEfii6Q5l++63JruaRkofjDP4ustxIvyPop6Y6NLWUfSdxKfzfoj+I56Iu5KJ/L1tVPhz+1HwWV/OGm/dFhPSn8pKXxUve/1CWlo41/cBJ0eNJP5eiomt3NW0qfDzxSXx1iJNVb84qmzS70fnHKFr05qRernfx7/WUueBO7FSAaKuiTkuj2883bjd8C76TztYAF8/LutujX8b4poVXD+K+9rcTD21R97/Mbrci9cpHMjvR6zNqSZtr7s65Z5uhceG00VCBOzaRGJ/gi2g72Vhj4CtvFQGD50KUmdyxjcNgsG+qqXdkzf44fN1NZX+Jfd+0snisfr8GlqwZ36w2PNztWDKLhxvDhdlDXRmECCxBmxANIWpCDizhDKMVDzxNyA0h14QesMSzJXqG0NOEPrDEtwl9Q+hrwgBYEtiEgSEMNGEILAltwtAQhppwAyzZ2IQbQ7jRhNtrs7o1hFtNGAFLtrbEyBBGOgCSh8hKgMkOXsAz0GPlDi386AChxALt7JkMoQ4RSjSQW8UmR6iDhBIP9BjnqxC3uthkCXWYUCKCVg7R5Al1oFBiglYW0WQKdahQooJWHtHkCnWwUOKCVibRZAt1uDC6PmEmX6gDxiUzaGWTm4RxnTA+EGbFk5uE8YsWdb1HWZrUeGno0V9E24vs17FXJ8lyYj7B31MDX88vixOsIT6dz6pdx6cz6djy3pAzWKiXhbJCZYVOVsbBTXkFyitw9JpezqncEpNB0VHx+6zEvOcldpzYeffZ9cO+hnh5xMsf1Rg5eU4He+VFrNxGJXe11kX0yaDcpn7YHOVqG0XMtsqMu+HVib4f90fEJiI2bmh1+eun8XBuuIXKLHT1ysaDdzWczZXVRlltXK1sk06g4qNyO35wN2KJ7V6dspU/WQY3vohhRs7OypGsCDoubP7azP8jKR9Cm+9qM+9DTU7IeuDW2W48pxMb0hPRDTd1+iI2BDR0w0OdEokNaYXoAOyOwaE4DH0V4mR3Pv8HS8jr/A=="; -------------------------------------------------------------------------------- /examples/data.js: -------------------------------------------------------------------------------- 1 | /** @type {import('../src/index.js').ShjLanguage[]} */ 2 | export const languages = [ 3 | 'js', 4 | 'py', 5 | 'bash', 6 | 'ts', 7 | 'c', 8 | 'css', 9 | 'asm', 10 | 'csv', 11 | 'diff', 12 | 'docker', 13 | 'git', 14 | 'go', 15 | 'html', 16 | 'http', 17 | 'ini', 18 | 'java', 19 | 'jsdoc', 20 | 'json', 21 | 'leanpub-md', 22 | 'bf', 23 | 'log', 24 | 'lua', 25 | 'make', 26 | 'md', 27 | 'pl', 28 | 'plain', 29 | 'regex', 30 | 'rs', 31 | 'sql', 32 | 'todo', 33 | 'toml', 34 | 'uri', 35 | 'xml', 36 | 'yaml' 37 | ] 38 | 39 | /** @type {import('../src/index.js').ShjBrowserTheme[]} */ 40 | export const themesBrowser = [ 41 | 'default', 42 | 'atom-dark', 43 | 'github-dark', 44 | 'github-dim', 45 | 'dark', 46 | 'github-light', 47 | 'visual-studio-dark' 48 | ] 49 | 50 | /** @type {import('../src/terminal.js').ShjTerminalTheme[]} */ 51 | export const themesTerminal = [ 52 | 'default', 53 | 'atom-dark' 54 | ] 55 | 56 | export const testFiles = [ 57 | ...languages, 58 | 'oneline.bash', 59 | 'oneline.http', 60 | 'screenshot.js' 61 | ] 62 | -------------------------------------------------------------------------------- /examples/languages/oneline.bash: -------------------------------------------------------------------------------- 1 | echo "hello world" -------------------------------------------------------------------------------- /examples/languages/oneline.http: -------------------------------------------------------------------------------- 1 | GET /path/to/file.js -------------------------------------------------------------------------------- /examples/languages/screenshot.js: -------------------------------------------------------------------------------- 1 | 'strict mode'; 2 | /** 3 | * Just sample of jsdoc 4 | * @name triangle 5 | * @param {Number} [size] 6 | */ 7 | 8 | //TODO ... 9 | const size = 10; 10 | 11 | // init state with first state 12 | let state = [...Array(size), 1, ...Array(size)]; 13 | 14 | for (let y = 0; y <= size; y++) { 15 | console.log(state.map(star => (star ? '*' : ' ')).join('')); 16 | 17 | state = state.map((_, i, arr) => arr[i + 1] || arr[i - 1]); 18 | } 19 | -------------------------------------------------------------------------------- /examples/languages/test.asm: -------------------------------------------------------------------------------- 1 | global main 2 | 3 | extern printf 4 | 5 | section .data 6 | fmt: db 'Res: %s',0x0a, 0 7 | msg: db 'Hello world!',0 8 | 9 | section .text 10 | main: 11 | mov rsi, msg ; ABI is rdi, rsi 12 | mov rdi, fmt 13 | mov rax, 0 ; rax is # of non-int args 14 | 15 | call printf 16 | 17 | # https://github.com/speed-highlight/core/issues/39 18 | vmovddup 2536(%rbx,%rax), %xmm1 # comment 19 | vmovaps 2528(%rbx,%rax), %xmm3 20 | vfmadd213ps %xmm6, %xmm5, %xmm3 21 | vpslld $23, %xmm4, %xmm4 22 | 23 | ret -------------------------------------------------------------------------------- /examples/languages/test.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | git commit && git push 4 | git commit || echo "Commit failed" 5 | 6 | set -euo pipefail 7 | IFS=$'\n\t' 8 | 9 | npm install speed_highlight_js 10 | 11 | TEST=5 12 | 13 | HELLO_WORLD="John" 14 | echo "Hi $NAME" #=> Hi John 15 | cat 'Hi $NAME'#=> TODO Hi $NAME 16 | 17 | printf "I'm in $(pwd)" 18 | echo "I'm in `pwd`" | grep 19 | # Same 20 | 21 | if [[ -z "$string" ]]; then 22 | cd "String is empty" 23 | elif [[ -n "$string" ]]; then 24 | alias "String is not empty" 25 | fi 26 | 27 | minify_file () { 28 | file=$1 29 | test=false 30 | out=${ file/${in_dir}/${out_dir} } 31 | exec_minify_cmd $file $out 32 | test-hello & 33 | ./a.out test-hello 34 | cat /etc/test 35 | } 36 | -------------------------------------------------------------------------------- /examples/languages/test.bf: -------------------------------------------------------------------------------- 1 | ++ Cell c0 = 2 2 | > +++++ Cell c1 = 5 3 | 4 | [ Start your loops with your cell pointer on the loop counter (c1 in our case) 5 | < + Add 1 to c0 6 | > - Subtract 1 from c1 7 | ] End your loops with the cell pointer on the loop counter 8 | 9 | At this point our program has added 5 to 2 leaving 7 in c0 and 0 in c1 10 | but we cannot output this value to the terminal since it is not ASCII encoded. 11 | 12 | To display the ASCII character "7" we must add 48 to the value 7. 13 | We use a loop to compute 48 = 6 * 8. 14 | 15 | ++++ ++++ c1 = 8 and this will be our loop counter again 16 | [ 17 | < +++ +++ Add 6 to c0 18 | > - Subtract 1 from c1 19 | ] 20 | < . Print out c0 which has the value 55 which translates to "7"! 21 | TODO ... -------------------------------------------------------------------------------- /examples/languages/test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "my_function_function1.h" 3 | 4 | #define TEST_FUNCTION my_function_function1 5 | 6 | #pragma GCC diagnostic ignored "-Wunused-parameter" 7 | 8 | //some random code example 9 | 10 | int fibonaaci(int n) { 11 | if (n == 0) { 12 | return 0; 13 | } else if (n == 1) { 14 | return 1; 15 | } else { 16 | return fibonaaci(n - 1) + fibonaaci(n - 2); 17 | } 18 | } 19 | 20 | typedef struct { 21 | int x; 22 | int y; 23 | } Point; 24 | 25 | /* 26 | * This is a comment 27 | */ 28 | 29 | int main(int argc, char **argv) 30 | { 31 | printf("Hello World!\n"); 32 | 33 | Point pTest; 34 | 35 | asm("movl $1, %0" : "=r"(p.x)); 36 | asm { 37 | movl $2, %eax 38 | movl %eax, %ebx 39 | movl %ebx, %ecx 40 | movl %ecx, %edx 41 | movl %edx, %esi 42 | movl %esi, %edi 43 | movl %edi, %ebp 44 | movl %ebp, %esp 45 | } 46 | 47 | printf("%d\n", fibonaaci(10)); 48 | 49 | argv += 1; 50 | argc -= 1; 51 | 52 | while (argc--) { 53 | printf("%s\n", *argv++); 54 | } 55 | 56 | return (0); 57 | } -------------------------------------------------------------------------------- /examples/languages/test.css: -------------------------------------------------------------------------------- 1 | @import "my-styles.css"; 2 | 3 | p > a, 4 | .class, 5 | #id { 6 | color: blue; 7 | text-decoration: underline; 8 | } 9 | /*TODO comment*/ 10 | 11 | @page :left { 12 | color: #2222; 13 | margin-left: 4cm; 14 | margin-right: 3cm; 15 | background: url(test.jpg); 16 | color: rgb(5, 5, 5); 17 | } 18 | @media print { 19 | body { font-size: 10pt } 20 | } -------------------------------------------------------------------------------- /examples/languages/test.csv: -------------------------------------------------------------------------------- 1 | cars,"chocolat, fruits",price 2 | yes,"no, 3 | maybe",x 4 | no,yes,y -------------------------------------------------------------------------------- /examples/languages/test.diff: -------------------------------------------------------------------------------- 1 | 0a1,6 2 | > This is an important 3 | > notice! It should 4 | > therefore be located at 5 | > the beginning of this 6 | > document! 7 | > 8 | 11,15d16 9 | < This paragraph contains 10 | < text that is outdated. 11 | + It will be deleted in the 12 | - near future. 13 | < 14 | 17c18 15 | < check this dokument. On 16 | --- 17 | > check this document. On 18 | 24a26,29 19 | > 20 | > This paragraph contains 21 | > important new additions 22 | > to this document. 23 | ! to this document. 24 | 25 | @@ -1 +1,2 @@ 26 | 27 | *** pos *** -------------------------------------------------------------------------------- /examples/languages/test.docker: -------------------------------------------------------------------------------- 1 | # create a dockerfile for a simple hello world app 2 | 3 | FROM ubuntu:14.04 4 | 5 | RUN apt-get update && apt-get install -y curl 6 | 7 | ENV APP_NAME hello-world 8 | 9 | EXPOSE 8080 10 | 11 | RUN echo "Hello World" > /usr/share/nginx/html/index.html 12 | 13 | ARG APP_NAME 14 | 15 | RUN [ -d /usr/share/nginx/html/$APP_NAME ] || mkdir /usr/share/nginx/html/$APP_NAME 16 | 17 | CMD ["/usr/sbin/nginx", "-g", "daemon off;"] 18 | 19 | LABEL maintainer="hello" 20 | 21 | maintainer 22 | 23 | ENTRYPOINT ["/bin/bash"] -------------------------------------------------------------------------------- /examples/languages/test.git: -------------------------------------------------------------------------------- 1 | git diff 2 | commit 526 3 | --- before 4 | +++ after 5 | @@ -1 +1,2 @@ 6 | # TODO comment 7 | -hello 8 | +test 9 | 'string' 10 | "string" -------------------------------------------------------------------------------- /examples/languages/test.go: -------------------------------------------------------------------------------- 1 | // create a simple program that takes a number and prints it out 2 | package main 3 | 4 | // import the fmt package 5 | import "fmt" 6 | 7 | // main is the entry point for the program 8 | func main() { 9 | // declare a variable named num and assign it the value of 10 10 | numTest := 10 11 | 12 | // sanity check 13 | fmt.Println("num is", numTest) 14 | 15 | //scan from the console and assign the value to the variable num 16 | fmt.Scanln(&numTest) 17 | 18 | 19 | // print the value of num 20 | fmt.Println(numTest) 21 | } -------------------------------------------------------------------------------- /examples/languages/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | Document 9 | 14 | 15 | 16 | 19 | html 20 | &#test; 21 | &123; 22 | 23 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /examples/languages/test.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Date: Mon, 23 May 2005 22:38:34 GMT 3 | Content-Type: text/html; charset=UTF-8 4 | Content-Length: 155 5 | Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT 6 | Server: Apache/1.3.3.7 (Unix) (Red-Hat/Linux) 7 | ETag: "3f80f-1b6-3e1cb03b" 8 | Accept-Ranges: bytes 9 | Connection: close 10 | 11 | 12 | 13 | An Example Page 14 | 15 | 16 |

Hello World, this is a very simple HTML document.

17 | 18 | -------------------------------------------------------------------------------- /examples/languages/test.ini: -------------------------------------------------------------------------------- 1 | [section] 2 | a=a 3 | b=str 4 | ;[section] 5 | # FIXME var=a 6 | file="str" 7 | -------------------------------------------------------------------------------- /examples/languages/test.java: -------------------------------------------------------------------------------- 1 | //import the language module 2 | import java.util.Scanner; 3 | 4 | //token class 5 | class Token { 6 | public String type; 7 | public String value; 8 | public int line; 9 | public int column; 10 | public token(String type, String value, int line, int column) { 11 | this.type = type; 12 | this.value = value; 13 | this.line = line; 14 | this.column = column; 15 | } 16 | } 17 | 18 | //lexer function that take a string and return a list of tokens 19 | List lexer(String s) { 20 | List tokensList = new ArrayList(); 21 | int line = 1; 22 | int column = 0; 23 | int i = 0; 24 | while (i < s.length()) { 25 | char c = s.charAt(i); 26 | if (c == '\n') { 27 | line++; 28 | column = 0; 29 | } else { 30 | column++; 31 | } 32 | } 33 | 34 | //function that take a list of tokens and execute the program 35 | void run(List) { 36 | Stack stack = new Stack(); 37 | for (Token token : tokens) { 38 | if (token.type == "NUMBER") { 39 | stack.push(Integer.parseInt(token.value)); 40 | } else if (token.type == "ID") { 41 | stack.push(stack.pop() + stack.pop()); 42 | } 43 | } 44 | System.out.println(stack.pop()); 45 | } 46 | 47 | //main function 48 | public static void main(String[] args) { 49 | String s = "1+2+3"; 50 | List tokensList = lexer(s); 51 | run(tokensList); 52 | } 53 | -------------------------------------------------------------------------------- /examples/languages/test.js: -------------------------------------------------------------------------------- 1 | /* Multiline FIX 2 | Comment */ 3 | /** 4 | * js doc CHANGED x 5 | * @param {String} param 6 | * @return nothing 7 | */ 8 | const listener = Deno.listen({ port: 8000 }); 9 | console.log(.8 * 0. * (0.8 * .e8) * 0.e8 * 0x849, 0d0101, 0o987, 8_987_654.1789) 10 | console?.log(`http://localhost:${PORT}/`.match(/:[0-9]{2,4}^/g)); 11 | // TODO other comment 12 | for await (const conn of listener) { 13 | if (false) 14 | break; 15 | (async () => { 16 | const requests = Deno.serveHttp(conn); 17 | for await (const { respondWith } of this.requests.new) { 18 | respondWith(new Response('Hello\ 19 | world')); 20 | } 21 | })(); 22 | } 23 | function test(test) { 24 | let test = () => { console.log(test) }; 25 | return test; 26 | } 27 | export default { 28 | jsonData: a > 5, 29 | match: /test/g, 30 | type: `test 31 | ${'test'}hello 32 | ${test + 2.5}hello`, 33 | 'Hello world': true 34 | } -------------------------------------------------------------------------------- /examples/languages/test.jsdoc: -------------------------------------------------------------------------------- 1 | @name test.js 2 | @params {Number} [test=null] -------------------------------------------------------------------------------- /examples/languages/test.json: -------------------------------------------------------------------------------- 1 | { 2 | "firstName": "John", 3 | "lastName": "Smith", 4 | "isAlive": true, 5 | "age": 27, 6 | "address": { 7 | "streetAddress": "21 2nd Street", 8 | "city": "New York", 9 | "state": "NY", 10 | "postalCode": "10021-3100" 11 | }, 12 | "phoneNumbers": [ 13 | { 14 | "type": "home", 15 | "number": "212 555-1234" 16 | }, 17 | { 18 | "type": "office", 19 | "number": "646 555-4567" 20 | } 21 | ], 22 | "children": [], 23 | "spouse": null 24 | } -------------------------------------------------------------------------------- /examples/languages/test.leanpub-md: -------------------------------------------------------------------------------- 1 | // You might see insertions 2 | leanpub-start-insert 3 | const webpack = require("webpack"); 4 | leanpub-end-insert 5 | 6 | // You might see deletions as well 7 | leanpub-start-delete 8 | const { MiniHtmlWebpackPlugin } = require("mini-html-webpack-plugin"); 9 | leanpub-end-delete 10 | 11 | // Or combinations of both 12 | leanpub-start-delete 13 | const { MiniHtmlWebpackPlugin } = require("mini-html-webpack-plugin"); 14 | leanpub-end-delete 15 | leanpub-start-insert 16 | x = lambda a : a + 10 17 | print(x(5)) 18 | leanpub-end-insert 19 | 20 | // If content has been omitted, then ellipsis is used 21 | ... 22 | -------------------------------------------------------------------------------- /examples/languages/test.lua: -------------------------------------------------------------------------------- 1 | #!/bin/lua 2 | 3 | --[=[ 4 | This is also a block comment 5 | We can include "]]" inside this comment 6 | --]=] 7 | 8 | --[==[ 9 | This is also a block comment 10 | We can include "]=]" inside this comment 11 | f --]==] 12 | 13 | vf --tst 14 | 15 | a = 'alo\n123"' 16 | a = "alo\n123\"" 17 | a = '\97lo\10\04923"' 18 | a = [[alo 19 | 123"]] 20 | a = [==[ 21 | alo 22 | 123"]==] 23 | 24 | var ::= prefixexp `[´ exp `]´ 25 | 26 | stat ::= while exp do block end 27 | stat ::= repeat block until exp 28 | stat ::= if exp then block {elseif exp then block} [else block] end 29 | 30 | do 31 | local f, s, var = explist 32 | while true do 33 | local var_1, ···, var_n = f(s, var) 34 | var = var_1 35 | if var == nil then break end 36 | block 37 | end 38 | end 39 | 40 | do 41 | local t = {} 42 | t[f(1)] = g 43 | t[1] = "x" -- 1st exp 44 | t[2] = "y" -- 2nd exp 45 | t.x = 1 -- t["x"] = 1 46 | t[3] = f(x) -- 3rd exp 47 | t[30] = 23 48 | t[4] = 45 -- 4th exp 49 | a = t 50 | end 51 | 52 | function max(num1, num2) 53 | 54 | if (num1 > num2) then 55 | result = num1; 56 | else 57 | result = num2; 58 | end 59 | 60 | return result; 61 | end 62 | --]=] -------------------------------------------------------------------------------- /examples/languages/test.make: -------------------------------------------------------------------------------- 1 | PACKAGE = package 2 | VERSION = ` date "+%Y.%m%d%" ` 3 | RELEASE_DIR = .. 4 | RELEASE_FILE = $(PACKAGE)-$(VERSION) 5 | 6 | # that won't understand these lines 7 | ifneq (,) 8 | This makefile requires GNU Make. 9 | endif 10 | 11 | # Notice that the variable LOGNAME comes from the environment in 12 | # POSIX shells. 13 | # 14 | # target: all - Default target. Does nothing. 15 | all: 16 | echo "Hello $(LOGNAME), nothing to do by default" 17 | # TODO sometimes: echo "Hello ${LOGNAME}, nothing to do by default" 18 | echo "Try 'make help'" 19 | 20 | # target: help - Display callable targets. 21 | help: 22 | egrep "^# target:" [Mm]akefile 23 | 24 | # target: list - List source files 25 | list: 26 | # Won't work. Each command is in separate shell 27 | @cd src 28 | ls 29 | 30 | # Correct, continuation of the same shell 31 | cd src; \ 32 | ls 33 | 34 | # target: dist - Make a release. 35 | dist: 36 | tar -cf $(RELEASE_DIR)/$(RELEASE_FILE) && \ 37 | gzip -9 $(RELEASE_DIR)/$(RELEASE_FILE).tar 38 | 39 | %.txt : %.html 40 | lynx -dump $< > $@ 41 | 42 | 43 | # This is an explicit suffix rule. It may be omitted on systems 44 | # that handle simple rules like this automatically. 45 | .c.o: 46 | $(CC) $(CFLAGS) -c $< 47 | 48 | FRC: 49 | .SUFFIXES: .c 50 | 51 | .PHONY: clean depend 52 | -------------------------------------------------------------------------------- /examples/languages/test.md: -------------------------------------------------------------------------------- 1 | Heading 2 | ======= 3 | 4 | Sub-heading 5 | ----------- 6 | 7 | Paragraphs are separated 8 | by a blank line. 9 | 10 | Two spaces at the end of a line 11 | produce a line break. 12 | 13 | Text attributes _italic_, 14 | **bold**, `monospace`. Some `console.log(lst.filter(e => e == true))` implementations may use *single-asterisks* for italic text. 15 | 16 | Horizontal rule: 17 | 18 | --- 19 | 20 | ``` 21 | 22 | 23 | ``` 24 | 25 | ```js 26 | for (let y = 0; y <= size; y++) { 27 | console.log(state.map(star => (star ? '*' : ' ')).join('')); 28 | state = state.map((_, i, arr) => arr[i + 1] || arr[i - 1]); 29 | } 30 | ``` 31 | 32 | ```beurihiuerh 33 | } 34 | ``` 35 | 36 | Strikethrough: 37 | ~~strikethrough~~ 38 | 39 | Bullet list: 40 | 41 | * apples 42 | * oranges 43 | * pears 44 | 45 | Numbered list: 46 | 47 | 1. lather 48 | 2. rinse 49 | 3. repeat 50 | 51 | An [example](http://example.com). 52 | 53 | ![Image](Icon-pictures.png "icon") 54 | 55 | > Markdown uses email-style 56 | > characters for blockquoting. 57 | > Multiple paragraphs need to be prepended individually. 58 | 59 | | Item | Price | # In stock | 60 | |--------------|-----------|------------| 61 | | Juicy Apples | 1.99 | *7* | 62 | | Bananas | **1.89** | 5234 | 63 | -------------------------------------------------------------------------------- /examples/languages/test.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | use warnings; 5 | 6 | # This would print with a line break in the middle 7 | print "Hello 8 | world\n"; 9 | $a = 10; 10 | print "Value of a = $a\n"; 11 | 12 | $var = <<'EOF'; 13 | 14 | my ( $remaining, $total ); 15 | 16 | $remaining = $total = shift(@ARGV); 17 | 18 | STDOUT->autoflush(1); 19 | 20 | while ( $remaining ) { 21 | printf ( "Remaining %s/%s \r", $remaining--, $total ); 22 | sleep 1; 23 | } 24 | 25 | print "\n"; -------------------------------------------------------------------------------- /examples/languages/test.plain: -------------------------------------------------------------------------------- 1 | In computing, plain text is a loose term for data (e.g. file contents) that represent only characters of readable material but not its graphical representation nor other objects (floating-point numbers, images, etc.). 2 | It may also include a limited number of "whitespace" characters that affect simple arrangement of text, such as spaces, line breaks, or tabulation characters (although tab characters can "mean" many different things, so are hardly "plain"). 3 | Plain text is different from formatted text, where style information is included; from structured text, where structural parts of the document such as paragraphs, sections, and the like are identified; and from binary files in which some portions must be interpreted as binary objects (encoded integers, real numbers, images, etc.). -------------------------------------------------------------------------------- /examples/languages/test.py: -------------------------------------------------------------------------------- 1 | #This is a comment 2 | #written in 3 | #more than just one line 4 | 5 | """ 6 | This is a comment 7 | written in 8 | more than just one line 9 | """ 10 | def fib(n): 11 | a, b = 0, 1 12 | while a < n: 13 | print(a, end=' ') 14 | a, b = b, a+b 15 | print() 16 | fib(1000) 17 | numbers = [2, 4, 6, 8] 18 | """ 19 | This is a comment 20 | written in 21 | more than just one line 22 | """ 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | class MyClass: 32 | def __init__(): 33 | x = 5 34 | x = "%1 test" % name 35 | x = f"test{x > 5} t est\n {numbers} {{{test}}}" 36 | x = F"test{x > 5} test\n {numbers} {{\{test}}}\" test 37 | 38 | x = lambda a : a + 10 39 | -------------------------------------------------------------------------------- /examples/languages/test.regex: -------------------------------------------------------------------------------- 1 | /([A-Z])\w+\d{0,9}/gi 2 | TODO comment -------------------------------------------------------------------------------- /examples/languages/test.rs: -------------------------------------------------------------------------------- 1 | /* 2 | create a simple multithreaded server 3 | */ 4 | 5 | //include the library 6 | use std::net::{TcpListener, TcpStream}; 7 | use std::io::{Read, Write}; 8 | use std::thread; 9 | 10 | //function that handles the client 11 | fn handle_client(mut stream: TcpStream) { 12 | //read the message 13 | let mut buffer = [0; 512]; 14 | stream.read(&mut buffer).unwrap(); 15 | //print the message 16 | println!("{}", String::from_utf8_lossy(&buffer[..])); 17 | //write the message back 18 | stream.write(&buffer).unwrap(); 19 | } 20 | 21 | //main function 22 | fn main() { 23 | //create a listener 24 | let listener = TcpListener::bind("127.0.0.1:8080").unwrap(); 25 | //listen for connections 26 | for stream in listener.incoming() { 27 | //handle the connection 28 | match stream { 29 | Ok(stream) => { 30 | thread::spawn(move || { 31 | handle_client(stream); 32 | }); 33 | } 34 | Err(e) => { 35 | println!("Error: {}", e); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /examples/languages/test.sql: -------------------------------------------------------------------------------- 1 | -- Comment 2 | SELECT 'Geeks' || ' ' || @test_hello FROM dual; 3 | INSERT INTO database (geek_id, geek_name) VALUES (5000, 'abc'); 4 | REPLACE('123geeks123', '123', TRUE); 5 | /* FIXME Multiline 6 | Comment */ -------------------------------------------------------------------------------- /examples/languages/test.todo: -------------------------------------------------------------------------------- 1 | TODO ... 2 | FIXME ... 3 | CHANGED ... 4 | CHANGE ... 5 | FIX ... 6 | XXX ... 7 | IDEA ... 8 | HACK ... 9 | NOTE ... 10 | REVIEW ... 11 | NB ... 12 | BUG ... 13 | QUESTION ... 14 | COMBAK ... 15 | TEMP ... 16 | DEBUG ... 17 | OPTIMIZE ... 18 | WARNING ... -------------------------------------------------------------------------------- /examples/languages/test.toml: -------------------------------------------------------------------------------- 1 | # CHANGED This is a TOML document 2 | 3 | title = "TOML Example" 4 | 5 | [owner] 6 | name = "Tom Preston-Werner" 7 | dob = 1979-05-27T07:32:00-08:00 8 | 9 | [database] 10 | enabled = true 11 | ports = [ 8000, inf, 8002 ] 12 | data = [ ["delta", "phi"], [3.14] ] 13 | temp_targets = { cpu = 79.5, case = 72.0 } 14 | re = """ 15 | test 16 | """ -------------------------------------------------------------------------------- /examples/languages/test.ts: -------------------------------------------------------------------------------- 1 | type Result = "pass" | "fail" 2 | 3 | interface User { 4 | id: number 5 | firstName: string 6 | lastName: string 7 | role: string 8 | result: Result 9 | } 10 | 11 | const test = { 12 | test: value 13 | }; 14 | 15 | function updateUser(id: number, update: Partial) { 16 | const user = getUser(id) 17 | const newUser = { ...user, ...update } 18 | saveUser(id, newUser) 19 | } 20 | 21 | function compact(arr: string[]) { 22 | if (arr.length > 10) 23 | return arr.slice(0, 10) 24 | return arr 25 | } 26 | 27 | namespace Validation { 28 | export interface StringValidator { 29 | isAcceptable(s: string): boolean; 30 | } 31 | const lettersRegexp = /^[A-Za-z]+$/; 32 | const numberRegexp = /^[0-9]+$/; 33 | export class LettersOnlyValidator implements StringValidator { 34 | isAcceptable(s: string) { 35 | return lettersRegexp.test(s); 36 | } 37 | } 38 | export class ZipCodeValidator implements StringValidator { 39 | isAcceptable(s: string) { 40 | return s.length === 5 && numberRegexp.test(s); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /examples/languages/test.uri: -------------------------------------------------------------------------------- 1 | https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top 2 | # TODO more uri 3 | http://github.matubu.com/shj/examples/index.html 4 | ldap://[2001:db8::7]/c=GB?objectClass?one 5 | mailto:John.Doe@example.com 6 | news:comp.infosystems.www.servers.unix 7 | tel:+1-816-555-1212 8 | telnet://192.0.2.16:80/ 9 | urn:oasis:names:specification:docbook:dtd:xml:4.1.2 -------------------------------------------------------------------------------- /examples/languages/test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Belgian Waffles 6 | $5.95 7 | 8 | Two of our famous Belgian Waffles with plenty of real maple syrup 9 | 10 | 650 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 4 20 | 21 | x 22 | < 23 | 10 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |

This element and attribute is here to show that speed-highlight is running.

32 | 33 |
34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /examples/languages/test.yaml: -------------------------------------------------------------------------------- 1 | --- # The Smiths 2 | - {name: John Smith, age: 33} 3 | - name: Mary Smith 4 | age: !!str 27 5 | - [name, age]: [Rae Smith, 4] # sequences as kwds are supported 6 | --- # TODO People, by gender 7 | men: ["John Smith", 'Bill Jones', Yes] 8 | data: > 9 | Wrapped text 10 | will be folded 11 | into a single 12 | paragraph 13 | 14 | Blank lines denote 15 | paragraph breaks 16 | women: 17 | - Mary Smith 18 | - Susan Williams -------------------------------------------------------------------------------- /examples/node-require/node.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'), 2 | path = require('path'), 3 | { setTheme, printHighlight } = require('@speed-highlight/core/terminal'); 4 | 5 | const lang = process.argv[2] ?? 'js'; 6 | 7 | setTheme('default').then(_ => { 8 | const code = fs.readFileSync(path.resolve(__dirname, `../languages/test.${lang}`)); 9 | 10 | printHighlight(code, lang); 11 | }); -------------------------------------------------------------------------------- /examples/node-require/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "test", 9 | "version": "1.0.0", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@speed-highlight/core": "file:../.." 13 | } 14 | }, 15 | "../..": { 16 | "version": "1.2.4", 17 | "license": "CC0-1.0", 18 | "devDependencies": { 19 | "@semantic-release/git": "^10.0.1", 20 | "semantic-release": "^21.0.7", 21 | "typescript": "^5.3.3" 22 | } 23 | }, 24 | "node_modules/@speed-highlight/core": { 25 | "resolved": "../..", 26 | "link": true 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /examples/node-require/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test", 3 | "version": "1.0.0", 4 | "description": "", 5 | "scripts": { 6 | "test": "node node.js" 7 | }, 8 | "author": "", 9 | "license": "ISC", 10 | "dependencies": { 11 | "@speed-highlight/core": "file:../.." 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/node-ts-module/.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | *.js.map -------------------------------------------------------------------------------- /examples/node-ts-module/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test", 3 | "version": "1.0.0", 4 | "description": "", 5 | "scripts": { 6 | "test": "tsc && node script.js" 7 | }, 8 | "author": "", 9 | "license": "ISC", 10 | "type": "module", 11 | "dependencies": { 12 | "@speed-highlight/core": "file:../.." 13 | }, 14 | "devDependencies": { 15 | "ts-node": "^10.9.2", 16 | "typescript": "^5.3.3" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /examples/node-ts-module/script.ts: -------------------------------------------------------------------------------- 1 | import { printHighlight, setTheme, ShjLanguage } from "@speed-highlight/core/terminal"; 2 | import { readFile } from "fs/promises"; 3 | 4 | const lang: ShjLanguage = process.argv[2] as ShjLanguage ?? 'js'; 5 | const code = await readFile(`../languages/test.${lang}`, "utf-8"); 6 | 7 | await setTheme("default"); 8 | await printHighlight(code, lang); 9 | -------------------------------------------------------------------------------- /examples/node-ts-module/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | // "module": "ESNext", 4 | // "target": "ESNext", 5 | // "moduleResolution": "node", 6 | 7 | 8 | "esModuleInterop": true, 9 | "lib": ["ESNext"], 10 | "module": "ESNext", 11 | "preserveConstEnums": true, 12 | "moduleResolution": "node", 13 | "strict": true, 14 | "sourceMap": true, 15 | "target": "ESNext", 16 | "types": ["node"], 17 | }, 18 | "include": ["script.ts"], 19 | "exclude": ["node_modules"] 20 | } -------------------------------------------------------------------------------- /examples/worker.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Web worker | Speed highlight JS 7 | 8 | 9 | 10 |
this.code = 'highlighted on a web worker'; 11 | this.isAwesome = new Boolean(.5);
12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/worker.js: -------------------------------------------------------------------------------- 1 | import { highlightText } from '../src/index.js' 2 | 3 | onmessage = async e => { 4 | const result = await highlightText(e.data[0], e.data[1] || 'js'); 5 | postMessage(result); 6 | }; 7 | -------------------------------------------------------------------------------- /src/common.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Commonly used match pattern 3 | */ 4 | 5 | export default { 6 | num: { 7 | type: 'num', 8 | match: /(\.e?|\b)\d(e-|[\d.oxa-fA-F_])*(\.|\b)/g 9 | }, 10 | str: { 11 | type: 'str', 12 | match: /(["'])(\\[^]|(?!\1)[^\r\n\\])*\1?/g 13 | }, 14 | strDouble: { 15 | type: 'str', 16 | match: /"((?!")[^\r\n\\]|\\[^])*"?/g 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/languages/asm.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | type: 'cmnt', 4 | match: /(;|#).*/gm 5 | }, 6 | { 7 | expand: 'str' 8 | }, 9 | { 10 | expand: 'num' 11 | }, 12 | { 13 | // value (ex: "$0x1") 14 | type: 'num', 15 | match: /\$[\da-fA-F]*\b/g 16 | }, 17 | { 18 | type: 'kwd', 19 | // ex: "section .data" 20 | match: /^[a-z]+\s+[a-z.]+\b/gm, 21 | sub: [ 22 | { 23 | // keyword (ex: "section") 24 | type: 'func', 25 | match: /^[a-z]+/g 26 | } 27 | ] 28 | }, 29 | { 30 | // instruction (ex: "mov") 31 | type: 'kwd', 32 | match: /^\t*[a-z][a-z\d]*\b/gm, 33 | }, 34 | { 35 | match: /%|\$/g, 36 | type: 'oper' 37 | } 38 | ] 39 | -------------------------------------------------------------------------------- /src/languages/bash.js: -------------------------------------------------------------------------------- 1 | let variable = { 2 | type: 'var', 3 | match: /\$\w+|\${[^}]*}|\$\([^)]*\)/g 4 | }; 5 | 6 | export default [ 7 | { 8 | sub: 'todo', 9 | match: /#.*/g 10 | }, 11 | { 12 | type: 'str', 13 | match: /(["'])((?!\1)[^\r\n\\]|\\[^])*\1?/g, 14 | sub: [ variable ] 15 | }, 16 | { 17 | // relative or absolute path 18 | type: "oper", 19 | match: /(?<=\s|^)\.*\/[a-z/_.-]+/gi, 20 | }, 21 | { 22 | type: 'kwd', 23 | match: /\s-[a-zA-Z]+|$<|[&|;]+|\b(unset|readonly|shift|export|if|fi|else|elif|while|do|done|for|until|case|esac|break|continue|exit|return|trap|wait|eval|exec|then|declare|enable|local|select|typeset|time|add|remove|install|update|delete)(?=\s|$)/g 24 | }, 25 | { 26 | expand: 'num' 27 | }, 28 | { 29 | // command 30 | type: 'func', 31 | match: /(?<=(^|\||\&\&|\;)\s*)[a-z_.-]+(?=\s|$)/gmi 32 | }, 33 | { 34 | type: 'bool', 35 | match: /(?<=\s|^)(true|false)(?=\s|$)/g 36 | }, 37 | // { 38 | // // function definition 39 | // type: 'func', 40 | // match: /(?<=\s|^)[a-z_]+(?=\s*\()/g 41 | // }, 42 | { 43 | type: 'oper', 44 | match: /[=(){}<>!]+/g 45 | }, 46 | { 47 | type: 'var', 48 | match: /(?<=\s|^)[\w_]+(?=\s*=)/g 49 | }, 50 | variable 51 | ] 52 | -------------------------------------------------------------------------------- /src/languages/bf.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | match: /[^\[\->+.<\]\s].*/g, 4 | sub: 'todo' 5 | }, 6 | { 7 | type: 'func', 8 | match: /\.+/g 9 | }, 10 | { 11 | type: 'kwd', 12 | match: /[<>]+/g 13 | }, 14 | { 15 | type: 'oper', 16 | match: /[+-]+/g 17 | } 18 | ] 19 | -------------------------------------------------------------------------------- /src/languages/c.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | match: /\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g, 4 | sub: 'todo' 5 | }, 6 | { 7 | expand: 'str' 8 | }, 9 | { 10 | expand: 'num' 11 | }, 12 | { 13 | type: 'kwd', 14 | match: /#\s*include (<.*>|".*")/g, 15 | sub: [ 16 | { 17 | type: 'str', 18 | match: /(<|").*/g 19 | } 20 | ] 21 | }, 22 | { 23 | match: /asm\s*{[^}]*}/g, 24 | sub: [ 25 | { 26 | type: 'kwd', 27 | match: /^asm/g 28 | }, 29 | { 30 | //type: 'str', 31 | match: /[^{}]*(?=}$)/g, 32 | sub: 'asm' 33 | } 34 | ] 35 | }, 36 | { 37 | type: 'kwd', 38 | match: /\*|&|#[a-z]+\b|\b(asm|auto|double|int|struct|break|else|long|switch|case|enum|register|typedef|char|extern|return|union|const|float|short|unsigned|continue|for|signed|void|default|goto|sizeof|volatile|do|if|static|while)\b/g 39 | }, 40 | { 41 | type: 'oper', 42 | match: /[/*+:?&|%^~=!,<>.^-]+/g 43 | }, 44 | { 45 | type: 'func', 46 | match: /[a-zA-Z_][\w_]*(?=\s*\()/g 47 | }, 48 | { 49 | type: 'class', 50 | match: /\b[A-Z][\w_]*\b/g 51 | } 52 | ] 53 | -------------------------------------------------------------------------------- /src/languages/css.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | match: /\/\*((?!\*\/)[^])*(\*\/)?/g, 4 | sub: 'todo' 5 | }, 6 | { 7 | expand: 'str' 8 | }, 9 | { 10 | type: 'kwd', 11 | match: /@\w+\b|\b(and|not|only|or)\b|\b[a-z-]+(?=[^{}]*{)/g 12 | }, 13 | { 14 | type: 'var', 15 | match: /\b[\w-]+(?=\s*:)|(::?|\.)[\w-]+(?=[^{}]*{)/g 16 | }, 17 | { 18 | type: 'func', 19 | match: /#[\w-]+(?=[^{}]*{)/g 20 | }, 21 | { 22 | type: 'num', 23 | match: /#[\da-f]{3,8}/g 24 | }, 25 | { 26 | type: 'num', 27 | match: /\d+(\.\d+)?(cm|mm|in|px|pt|pc|em|ex|ch|rem|vm|vh|vmin|vmax|%)?/g, 28 | sub: [ 29 | { 30 | type: 'var', 31 | match: /[a-z]+|%/g 32 | } 33 | ] 34 | }, 35 | { 36 | match: /url\([^)]*\)/g, 37 | sub: [ 38 | { 39 | type: 'func', 40 | match: /url(?=\()/g 41 | }, 42 | { 43 | type: 'str', 44 | match: /[^()]+/g 45 | } 46 | ] 47 | }, 48 | { 49 | type: 'func', 50 | match: /\b[a-zA-Z]\w*(?=\s*\()/g 51 | }, 52 | { 53 | type: 'num', 54 | match: /\b[a-z-]+\b/g 55 | } 56 | ] 57 | -------------------------------------------------------------------------------- /src/languages/csv.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | expand: 'strDouble' 4 | }, 5 | { 6 | type: 'oper', 7 | match: /,/g 8 | } 9 | ] 10 | -------------------------------------------------------------------------------- /src/languages/diff.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | type: 'deleted', 4 | match: /^[-<].*/gm 5 | }, 6 | { 7 | type: 'insert', 8 | match: /^[+>].*/gm 9 | }, 10 | { 11 | type: 'kwd', 12 | match: /!.*/gm 13 | }, 14 | { 15 | type: 'section', 16 | match: /^@@.*@@$|^\d.*|^([*-+])\1\1.*/gm 17 | } 18 | ] 19 | -------------------------------------------------------------------------------- /src/languages/docker.js: -------------------------------------------------------------------------------- 1 | import bash from "./bash.js" 2 | 3 | export default [ 4 | { 5 | type: 'kwd', 6 | match: /^(FROM|RUN|CMD|LABEL|MAINTAINER|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ARG|ONBUILD|STOPSIGNAL|HEALTHCHECK|SHELL)\b/gmi 7 | }, 8 | ...bash 9 | ] -------------------------------------------------------------------------------- /src/languages/git.js: -------------------------------------------------------------------------------- 1 | import diff from './diff.js' 2 | 3 | export default [ 4 | { 5 | match: /^#.*/gm, 6 | sub: 'todo' 7 | }, 8 | { 9 | expand: 'str' 10 | }, 11 | ...diff, 12 | { 13 | type: 'func', 14 | match: /^(\$ )?git(\s.*)?$/gm 15 | }, 16 | { 17 | type: 'kwd', 18 | match: /^commit \w+$/gm 19 | } 20 | ] 21 | -------------------------------------------------------------------------------- /src/languages/go.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | match: /\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g, 4 | sub: 'todo' 5 | }, 6 | { 7 | expand: 'str' 8 | }, 9 | { 10 | expand: 'num' 11 | }, 12 | { 13 | type: 'kwd', 14 | match: /\*|&|\b(break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go|goto|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/g 15 | }, 16 | { 17 | type: 'func', 18 | match: /[a-zA-Z_][\w_]*(?=\s*\()/g 19 | }, 20 | { 21 | type: 'class', 22 | match: /\b[A-Z][\w_]*\b/g 23 | }, 24 | { 25 | type: 'oper', 26 | match: /[+\-*\/%&|^~=!<>.^-]+/g 27 | } 28 | ] -------------------------------------------------------------------------------- /src/languages/html.js: -------------------------------------------------------------------------------- 1 | import xml, { properties, xmlElement } from './xml.js' 2 | 3 | export default [ 4 | { 5 | type: 'class', 6 | match: /])*>/gi, 7 | sub: [ 8 | { 9 | type: 'str', 10 | match: /"[^"]*"|'[^']*'/g 11 | }, 12 | { 13 | type: 'oper', 14 | match: /^$/g 15 | }, 16 | { 17 | type: 'var', 18 | match: /DOCTYPE/gi 19 | } 20 | ] 21 | }, 22 | { 23 | match: RegExp(`((?!)[^])*`, 'g'), 24 | sub: [ 25 | { 26 | match: RegExp(`^`, 'g'), 27 | sub: xmlElement.sub 28 | }, 29 | { 30 | match: RegExp(`${xmlElement.match}|[^]*(?=$)`, 'g'), 31 | sub: 'css' 32 | }, 33 | xmlElement 34 | ] 35 | }, 36 | { 37 | match: RegExp(`((?!)[^])*`, 'g'), 38 | sub: [ 39 | { 40 | match: RegExp(`^`, 'g'), 41 | sub: xmlElement.sub 42 | }, 43 | { 44 | match: RegExp(`${xmlElement.match}|[^]*(?=$)`, 'g'), 45 | sub: 'js' 46 | }, 47 | xmlElement 48 | ] 49 | }, 50 | ...xml 51 | ] 52 | -------------------------------------------------------------------------------- /src/languages/http.js: -------------------------------------------------------------------------------- 1 | import { detectLanguage } from '../detect.js' 2 | 3 | export default [ 4 | { 5 | type: 'kwd', 6 | match: /^(GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH|PRI|SEARCH)\b/gm 7 | }, 8 | { 9 | expand: 'str' 10 | }, 11 | { 12 | type: 'section', 13 | match: /\bHTTP\/[\d.]+\b/g 14 | }, 15 | { 16 | expand: 'num' 17 | }, 18 | { 19 | type: 'oper', 20 | match: /[,;:=]/g 21 | }, 22 | { 23 | type: 'var', 24 | match: /[a-zA-Z][\w-]*(?=:)/g 25 | }, 26 | { 27 | match: /\n\n[^]*/g, 28 | sub: detectLanguage 29 | } 30 | ] 31 | -------------------------------------------------------------------------------- /src/languages/ini.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | match: /(^[ \f\t\v]*)[#;].*/gm, 4 | sub: 'todo' 5 | }, 6 | { 7 | type: 'str', 8 | match: /.*/g 9 | }, 10 | { 11 | type: 'var', 12 | match: /.*(?==)/g 13 | }, 14 | { 15 | type: 'section', 16 | match: /^\s*\[.+\]\s*$/gm 17 | }, 18 | { 19 | type: 'oper', 20 | match: /=/g 21 | } 22 | ] 23 | -------------------------------------------------------------------------------- /src/languages/java.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | match: /\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g, 4 | sub: 'todo' 5 | }, 6 | { 7 | expand: 'str' 8 | }, 9 | { 10 | expand: 'num' 11 | }, 12 | { 13 | type: 'kwd', 14 | match: /\b(abstract|assert|boolean|break|byte|case|catch|char|class|continue|const|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|package|private|protected|public|requires|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|transient|try|var|void|volatile|while)\b/g 15 | }, 16 | { 17 | type: 'oper', 18 | match: /[/*+:?&|%^~=!,<>.^-]+/g 19 | }, 20 | { 21 | type: 'func', 22 | match: /[a-zA-Z_][\w_]*(?=\s*\()/g 23 | }, 24 | { 25 | type: 'class', 26 | match: /\b[A-Z][\w_]*\b/g 27 | } 28 | ] -------------------------------------------------------------------------------- /src/languages/js.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | match: /\/\*\*((?!\*\/)[^])*(\*\/)?/g, 4 | sub: 'jsdoc' 5 | }, 6 | { 7 | match: /\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g, 8 | sub: 'todo' 9 | }, 10 | { 11 | expand: 'str' 12 | }, 13 | { 14 | match: /`((?!`)[^]|\\[^])*`?/g, 15 | sub: 'js_template_literals' 16 | }, 17 | { 18 | type: 'kwd', 19 | match: /=>|\b(this|set|get|as|async|await|break|case|catch|class|const|constructor|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|if|implements|import|in|instanceof|interface|let|var|of|new|package|private|protected|public|return|static|super|switch|throw|throws|try|typeof|void|while|with|yield)\b/g 20 | }, 21 | { 22 | match: /\/((?!\/)[^\r\n\\]|\\.)+\/[dgimsuy]*/g, 23 | sub: 'regex' 24 | }, 25 | { 26 | expand: 'num' 27 | }, 28 | { 29 | type: 'num', 30 | match: /\b(NaN|null|undefined|[A-Z][A-Z_]*)\b/g 31 | }, 32 | { 33 | type: 'bool', 34 | match: /\b(true|false)\b/g 35 | }, 36 | { 37 | type: 'oper', 38 | match: /[/*+:?&|%^~=!,<>.^-]+/g 39 | }, 40 | { 41 | type: 'class', 42 | match: /\b[A-Z][\w_]*\b/g 43 | }, 44 | { 45 | type: 'func', 46 | match: /[a-zA-Z$_][\w$_]*(?=\s*((\?\.)?\s*\(|=\s*(\(?[\w,{}\[\])]+\)? =>|function\b)))/g 47 | } 48 | ] 49 | -------------------------------------------------------------------------------- /src/languages/js_template_literals.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | match: new class { 4 | exec(str) { 5 | let i = this.lastIndex, 6 | j, 7 | f = _ => { 8 | while (++i < str.length - 2) 9 | if (str[i] == '{') f(); 10 | else if (str[i] == '}') return; 11 | }; 12 | for (; i < str.length; ++i) 13 | if (str[i - 1] != '\\' && str[i] == '$' && str[i + 1] == '{') { 14 | j = i++; 15 | f(i); 16 | this.lastIndex = i + 1; 17 | return { index: j, 0: str.slice(j, i + 1) }; 18 | } 19 | return null; 20 | } 21 | }(), 22 | sub: [ 23 | { 24 | type: 'kwd', 25 | match: /^\${|}$/g 26 | }, 27 | { 28 | match: /(?!^\$|{)[^]+(?=}$)/g, 29 | sub: 'js' 30 | }, 31 | ], 32 | }, 33 | ]; 34 | export let type = 'str'; 35 | -------------------------------------------------------------------------------- /src/languages/jsdoc.js: -------------------------------------------------------------------------------- 1 | import todo from './todo.js'; 2 | 3 | export default [ 4 | { 5 | type: 'kwd', 6 | match: /@\w+/g 7 | }, 8 | { 9 | type: 'class', 10 | match: /{[\w\s|<>,.@\[\]]+}/g 11 | }, 12 | { 13 | type: 'var', 14 | match: /\[[\w\s="']+\]/g 15 | }, 16 | ...todo 17 | ]; 18 | export let type = 'cmnt'; 19 | -------------------------------------------------------------------------------- /src/languages/json.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | type: 'var', 4 | match: /("|')?[a-zA-Z]\w*\1(?=\s*:)/g 5 | }, 6 | { 7 | expand: 'str' 8 | }, 9 | { 10 | expand: 'num' 11 | }, 12 | { 13 | type: 'num', 14 | match: /\bnull\b/g 15 | }, 16 | { 17 | type: 'bool', 18 | match: /\b(true|false)\b/g 19 | } 20 | ] 21 | -------------------------------------------------------------------------------- /src/languages/leanpub-md.js: -------------------------------------------------------------------------------- 1 | import md from './md.js' 2 | import { detectLanguage } from '../detect.js' 3 | 4 | export default [ 5 | { 6 | type: 'insert', 7 | match: /(leanpub-start-insert)((?!leanpub-end-insert)[^])*(leanpub-end-insert)?/g, 8 | sub: [ 9 | { 10 | type: 'insert', 11 | match: /leanpub-(start|end)-insert/g 12 | }, 13 | { 14 | match: /(?!leanpub-start-insert)((?!leanpub-end-insert)[^])*/g, 15 | sub: detectLanguage 16 | } 17 | ] 18 | }, 19 | { 20 | type: 'deleted', 21 | match: /(leanpub-start-delete)((?!leanpub-end-delete)[^])*(leanpub-end-delete)?/g, 22 | sub: [ 23 | { 24 | type: 'deleted', 25 | match: /leanpub-(start|end)-delete/g 26 | }, 27 | { 28 | match: /(?!leanpub-start-delete)((?!leanpub-end-delete)[^])*/g, 29 | sub: detectLanguage 30 | } 31 | ] 32 | }, 33 | ...md 34 | ] 35 | -------------------------------------------------------------------------------- /src/languages/log.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | type: 'cmnt', 4 | match: /^#.*/gm 5 | }, 6 | { 7 | expand: 'strDouble' 8 | }, 9 | { 10 | expand: 'num' 11 | }, 12 | { 13 | type: 'err', 14 | match: /\b(err(or)?|[a-z_-]*exception|warn|warning|failed|ko|invalid|not ?found|alert|fatal)\b/gi 15 | }, 16 | { 17 | type: 'num', 18 | match: /\b(null|undefined)\b/gi 19 | }, 20 | { 21 | type: 'bool', 22 | match: /\b(false|true|yes|no)\b/gi 23 | }, 24 | { 25 | type: 'oper', 26 | match: /\.|,/g 27 | } 28 | ] 29 | -------------------------------------------------------------------------------- /src/languages/lua.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | match: /^#!.*|--(\[(=*)\[((?!--\]\2\])[^])*--\]\2\]|.*)/g, 4 | sub: 'todo' 5 | }, 6 | { 7 | expand: 'str' 8 | }, 9 | { 10 | type: 'kwd', 11 | match: /\b(and|break|do|else|elseif|end|for|function|if|in|local|not|or|repeat|return|then|until|while)\b/g 12 | }, 13 | { 14 | type: 'bool', 15 | match: /\b(true|false|nil)\b/g 16 | }, 17 | { 18 | type: 'oper', 19 | match: /[+*/%^#=~<>:,.-]+/g 20 | }, 21 | { 22 | expand: 'num' 23 | }, 24 | { 25 | type: 'func', 26 | match: /[a-z_]+(?=\s*[({])/g 27 | } 28 | ] 29 | -------------------------------------------------------------------------------- /src/languages/make.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | match: /^\s*#.*/gm, 4 | sub: 'todo' 5 | }, 6 | { 7 | expand: 'str' 8 | }, 9 | { 10 | type: 'oper', 11 | match: /[${}()]+/g 12 | }, 13 | { 14 | type: 'class', 15 | match: /.PHONY:/gm 16 | }, 17 | { 18 | type: 'section', 19 | match: /^[\w.]+:/gm 20 | }, 21 | { 22 | type: 'kwd', 23 | match: /\b(ifneq|endif)\b/g 24 | }, 25 | { 26 | expand: 'num' 27 | }, 28 | { 29 | type: 'var', 30 | match: /[A-Z_]+(?=\s*=)/g 31 | }, 32 | { 33 | match: /^.*$/gm, 34 | sub: 'bash' 35 | } 36 | ] 37 | -------------------------------------------------------------------------------- /src/languages/md.js: -------------------------------------------------------------------------------- 1 | import { detectLanguage } from '../detect.js' 2 | 3 | export default [ 4 | { 5 | type: 'cmnt', 6 | match: /^>.*|(=|-)\1+/gm 7 | }, 8 | { 9 | type: 'class', 10 | match: /\*\*((?!\*\*).)*\*\*/g 11 | }, 12 | { 13 | match: /```((?!```)[^])*\n```/g, 14 | sub: code => ({ 15 | type: 'kwd', 16 | sub: [ 17 | { 18 | match: /\n[^]*(?=```)/g, 19 | sub: code.split('\n')[0].slice(3) || detectLanguage(code) 20 | } 21 | ] 22 | }) 23 | }, 24 | { 25 | type: 'str', 26 | match: /`[^`]*`/g 27 | }, 28 | { 29 | type: 'var', 30 | match: /~~((?!~~).)*~~/g 31 | }, 32 | { 33 | type: 'kwd', 34 | match: /_[^_]*_|\*[^*]*\*/g 35 | }, 36 | { 37 | type: 'kwd', 38 | match: /^\s*(\*|\d+\.)\s/gm 39 | }, 40 | { 41 | type: 'oper', 42 | match: /\[[^\]]*]/g 43 | }, 44 | { 45 | type: 'func', 46 | match: /\([^)]*\)/g 47 | } 48 | ] 49 | -------------------------------------------------------------------------------- /src/languages/pl.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | match: /#.*/g, 4 | sub: 'todo' 5 | }, 6 | { 7 | type: 'str', 8 | match: /(["'])(\\[^]|(?!\1)[^])*\1?/g 9 | }, 10 | { 11 | expand: 'num' 12 | }, 13 | { 14 | type: 'kwd', 15 | match: /\b(any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while|not|and|or|xor)\b/g 16 | }, 17 | { 18 | type: 'oper', 19 | match: /[-+*/%~!&<>|=?,]+/g 20 | }, 21 | { 22 | type: 'func', 23 | match: /[a-z_]+(?=\s*\()/g 24 | } 25 | ] 26 | -------------------------------------------------------------------------------- /src/languages/plain.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | expand: 'strDouble' 4 | } 5 | ] 6 | -------------------------------------------------------------------------------- /src/languages/py.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | match: /#.*/g, 4 | sub: 'todo' 5 | }, 6 | { 7 | match: /("""|''')(\\[^]|(?!\1)[^])*\1?/g, 8 | sub: 'todo' 9 | }, 10 | { 11 | type: 'str', 12 | match: /f("|')(\\[^]|(?!\1).)*\1?|f((["'])\4\4)(\\[^]|(?!\3)[^])*\3?/gi, 13 | sub: [ 14 | { 15 | type: 'var', 16 | match: /{[^{}]*}/g, 17 | sub: [ 18 | { 19 | match: /(?!^{)[^]*(?=}$)/g, 20 | sub: 'py' 21 | } 22 | ] 23 | } 24 | ] 25 | }, 26 | { 27 | expand: 'str' 28 | }, 29 | { 30 | type: 'kwd', 31 | match: /\b(and|as|assert|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|raise|return|try|while|with|yield)\b/g 32 | }, 33 | { 34 | type: 'bool', 35 | match: /\b(False|True|None)\b/g 36 | }, 37 | { 38 | expand: 'num' 39 | }, 40 | { 41 | type: 'func', 42 | match: /[a-z_]+(?=\s*\()/g 43 | }, 44 | { 45 | type: 'oper', 46 | match: /[-/*+<>,=!&|^%]+/g 47 | }, 48 | { 49 | type: 'class', 50 | match: /\b[A-Z][\w_]*\b/g 51 | } 52 | ] 53 | -------------------------------------------------------------------------------- /src/languages/regex.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | match: /^(?!\/).*/gm, 4 | sub: 'todo' 5 | }, 6 | { 7 | type: 'num', 8 | match: /\[((?!\])[^\\]|\\.)*\]/g 9 | }, 10 | { 11 | type: 'kwd', 12 | match: /\||\^|\$|\\.|\w+($|\r|\n)/g 13 | }, 14 | { 15 | type: 'var', 16 | match: /\*|\+|\{\d+,\d+\}/g 17 | } 18 | ]; 19 | export let type = 'oper'; 20 | -------------------------------------------------------------------------------- /src/languages/rs.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | match: /\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g, 4 | sub: 'todo' 5 | }, 6 | { 7 | expand: 'str' 8 | }, 9 | { 10 | expand: 'num' 11 | }, 12 | { 13 | type: 'kwd', 14 | match: /\b(as|break|const|continue|crate|else|enum|extern|false|fn|for|if|impl|in|let|loop|match|mod|move|mut|pub|ref|return|self|Self|static|struct|super|trait|true|type|unsafe|use|where|while|async|await|dyn|abstract|become|box|do|final|macro|override|priv|typeof|unsized|virtual|yield|try)\b/g 15 | }, 16 | { 17 | type: 'oper', 18 | match: /[/*+:?&|%^~=!,<>.^-]+/g 19 | }, 20 | { 21 | type: 'class', 22 | match: /\b[A-Z][\w_]*\b/g 23 | }, 24 | { 25 | type: 'func', 26 | match: /[a-zA-Z_][\w_]*(?=\s*!?\s*\()/g 27 | } 28 | ] -------------------------------------------------------------------------------- /src/languages/todo.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | type: 'err', 4 | match: /\b(TODO|FIXME|DEBUG|OPTIMIZE|WARNING|XXX|BUG)\b/g 5 | }, 6 | { 7 | type: 'class', 8 | match: /\bIDEA\b/g 9 | }, 10 | { 11 | type: 'insert', 12 | match: /\b(CHANGED|FIX|CHANGE)\b/g 13 | }, 14 | { 15 | type: 'oper', 16 | match: /\bQUESTION\b/g 17 | } 18 | ]; 19 | export let type = 'cmnt'; 20 | -------------------------------------------------------------------------------- /src/languages/toml.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | match: /#.*/g, 4 | sub: 'todo' 5 | }, 6 | { 7 | type: 'str', 8 | match: /("""|''')((?!\1)[^]|\\[^])*\1?/g 9 | }, 10 | { 11 | expand: 'str' 12 | }, 13 | { 14 | type: 'section', 15 | match: /^\[.+\]\s*$/gm 16 | }, 17 | { 18 | type: 'num', 19 | match: /\b(inf|nan)\b|\d[\d:ZT.-]*/g 20 | }, 21 | { 22 | expand: 'num' 23 | }, 24 | { 25 | type: 'bool', 26 | match: /\b(true|false)\b/g 27 | }, 28 | { 29 | type: 'oper', 30 | match: /[+,.=-]/g 31 | }, 32 | { 33 | type: 'var', 34 | match: /\w+(?= \=)/g 35 | } 36 | ] 37 | -------------------------------------------------------------------------------- /src/languages/ts.js: -------------------------------------------------------------------------------- 1 | import js from './js.js' 2 | 3 | export default [ 4 | { 5 | type: 'type', 6 | match: /:\s*(any|void|number|boolean|string|object|never|enum)\b/g 7 | }, 8 | { 9 | type: 'kwd', 10 | match: /\b(type|namespace|typedef|interface|public|private|protected|implements|declare|abstract|readonly)\b/g 11 | }, 12 | ...js 13 | ] 14 | -------------------------------------------------------------------------------- /src/languages/uri.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | match: /^#.*/gm, 4 | sub: 'todo' 5 | }, 6 | { 7 | type: 'class', 8 | match: /^\w+(?=:?)/gm 9 | }, 10 | { 11 | type: 'num', 12 | match: /:\d+/g 13 | }, 14 | { 15 | type: 'oper', 16 | match: /[:/&?]|\w+=/g 17 | }, 18 | { 19 | type: 'func', 20 | match: /[.\w]+@|#[\w]+$/gm 21 | }, 22 | { 23 | type: 'var', 24 | match: /\w+\.\w+(\.\w+)*/g 25 | } 26 | ] 27 | -------------------------------------------------------------------------------- /src/languages/xml.js: -------------------------------------------------------------------------------- 1 | let 2 | nameStartChar = ":A-Z_a-z\u{C0}-\u{D6}\u{D8}-\u{F6}\u{F8}-\u{2FF}\u{370}-\u{37D}\u{37F}-\u{1FFF}\u{200C}-\u{200D}\u{2070}-\u{218F}\u{2C00}-\u{2FEF}\u{3001}-\u{D7FF}\u{F900}-\u{FDCF}\u{FDF0}-\u{FFFD}", 3 | nameChar = nameStartChar + "\\-\\.0-9\u{B7}\u{0300}-\u{036F}\u{203F}-\u{2040}"; 4 | export let 5 | name = `[${nameStartChar}][${nameChar}]*`, 6 | properties = `\\s*(\\s+${name}\\s*(=\\s*([^"']\\S*|("|')(\\\\[^]|(?!\\4)[^])*\\4?)?)?\\s*)*`, 7 | xmlElement = { 8 | match: RegExp(`<[\/!?]?${name}${properties}[\/!?]?>`, 'g'), 9 | sub: [ 10 | { 11 | type: 'var', 12 | match: RegExp(`^<[\/!?]?${name}`, 'g'), 13 | sub: [ 14 | { 15 | type: 'oper', 16 | match: /^<[\/!?]?/g 17 | } 18 | ] 19 | }, 20 | { 21 | type: 'str', 22 | match: /=\s*([^"']\S*|("|')(\\[^]|(?!\2)[^])*\2?)/g, 23 | sub: [ 24 | { 25 | type: 'oper', 26 | match: /^=/g 27 | } 28 | ] 29 | }, 30 | { 31 | type: 'oper', 32 | match: /[\/!?]?>/g 33 | }, 34 | { 35 | type: 'class', 36 | match: RegExp(name, 'g') 37 | } 38 | ] 39 | }; 40 | 41 | export default [ 42 | { 43 | match: /)[^])*-->/g, 44 | sub: 'todo' 45 | }, 46 | { 47 | type: 'class', 48 | match: //gi 49 | }, 50 | xmlElement, 51 | // https://github.com/speed-highlight/core/issues/49 52 | { 53 | type: 'str', 54 | match: RegExp(`<\\?${name}([^?]|\\?[^?>])*\\?+>`, 'g'), 55 | sub: [ 56 | { 57 | type: 'var', 58 | match: RegExp(`^<\\?${name}`, 'g'), 59 | sub: [ 60 | { 61 | type: 'oper', 62 | match: /^<\?/g 63 | } 64 | ] 65 | }, 66 | { 67 | type: 'oper', 68 | match: /\?+>$/g 69 | } 70 | ] 71 | }, 72 | { 73 | type: 'var', 74 | match: /&(#x?)?[\da-z]{1,8};/gi 75 | } 76 | ] 77 | -------------------------------------------------------------------------------- /src/languages/yaml.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | match: /#.*/g, 4 | sub: 'todo' 5 | }, 6 | { 7 | expand: 'str' 8 | }, 9 | { 10 | type: 'str', 11 | match: /(>|\|)\r?\n((\s[^\n]*)?(\r?\n|$))*/g 12 | }, 13 | { 14 | type: 'type', 15 | match: /!![a-z]+/g 16 | }, 17 | { 18 | type: 'bool', 19 | match: /\b(Yes|No)\b/g 20 | }, 21 | { 22 | type: 'oper', 23 | match: /[+:-]/g 24 | }, 25 | { 26 | expand: 'num' 27 | }, 28 | { 29 | type: 'var', 30 | match: /[a-zA-Z]\w*(?=:)/g 31 | } 32 | ] 33 | -------------------------------------------------------------------------------- /src/terminal.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @module terminal 3 | * (Terminal adaptor) 4 | */ 5 | 6 | /** 7 | * @typedef {import('./index.js').ShjLanguage} ShjLanguage 8 | */ 9 | 10 | /** 11 | * Languages supported 12 | * @typedef {('default'|'atom-dark')} ShjTerminalTheme 13 | */ 14 | 15 | import { tokenize } from './index.js'; 16 | 17 | let theme = import('./themes/default.js'); 18 | 19 | /** 20 | * Highlight a string passed as argument and return a string that can directly be printed 21 | * 22 | * @async 23 | * @function highlightText 24 | * @param {string} src The code 25 | * @param {ShjLanguage} lang The language of the code 26 | * @returns {Promise} The highlighted string 27 | */ 28 | export const highlightText = async (src, lang) => { 29 | let res = '', themeMap = (await theme).default; 30 | 31 | await tokenize(src, lang, (str, token) => res += token ? `${themeMap[token] ?? ''}${str}\x1b[0m` : str); 32 | 33 | return res; 34 | }; 35 | 36 | /** 37 | * Highlight and print a given string 38 | * 39 | * @async 40 | * @function printHighlight 41 | * @param {string} src The code 42 | * @param {ShjLanguage} lang The language of the code 43 | */ 44 | export const printHighlight = async (src, lang) => console.log(await highlightText(src, lang)); 45 | 46 | /** 47 | * Change the current used theme for highlighting 48 | * 49 | * @function setTheme 50 | * @param {ShjTerminalTheme} name The name of the theme 51 | */ 52 | export const setTheme = async name => theme = import(`./themes/${name}.js`); -------------------------------------------------------------------------------- /src/themes/atom-dark.css: -------------------------------------------------------------------------------- 1 | @import 'default.css'; 2 | 3 | [class*="shj-lang-"] { 4 | color: #abb2bf; 5 | background: #161b22 6 | } 7 | [class*="shj-lang-"]:before {color: #6f9aff} 8 | 9 | .shj-syn-deleted, 10 | .shj-syn-err, 11 | .shj-syn-var {color: #e06c75} 12 | .shj-syn-section, 13 | .shj-syn-oper, 14 | .shj-syn-kwd {color: #c678dd} 15 | .shj-syn-class {color: #e5c07b} 16 | .shj-numbers, 17 | .shj-syn-cmnt {color: #76839a} 18 | .shj-syn-insert {color: #98c379} 19 | .shj-syn-type {color: #56b6c2} 20 | .shj-syn-num, 21 | .shj-syn-bool {color: #d19a66} 22 | .shj-syn-str, 23 | .shj-syn-func {color: #61afef} 24 | -------------------------------------------------------------------------------- /src/themes/atom-dark.js: -------------------------------------------------------------------------------- 1 | import col from './termcolor.js' 2 | 3 | export default { 4 | deleted: col.red, 5 | var: col.red, 6 | err: col.red, 7 | kwd: col.magenta, 8 | num: col.yellow, 9 | class: col.yellow, 10 | cmnt: col.gray, 11 | insert: col.green, 12 | str: col.green, 13 | bool: col.cyan, 14 | type: col.blue, 15 | oper: col.blue, 16 | section: col.magenta, 17 | func: col.blue 18 | } -------------------------------------------------------------------------------- /src/themes/dark.css: -------------------------------------------------------------------------------- 1 | @import 'default.css'; 2 | 3 | [class*="shj-lang-"] { 4 | color: #f8f8f2; 5 | background: #1a1a1c 6 | } 7 | [class*="shj-lang-"]:before {color: #6f9aff} 8 | 9 | .shj-syn-deleted, 10 | .shj-syn-err, 11 | .shj-syn-var {color: #ff5261} 12 | .shj-syn-section, 13 | .shj-syn-kwd {color: #ff7cc6} 14 | .shj-syn-class {color: #eab07c} 15 | .shj-numbers, 16 | .shj-syn-cmnt {color: #7d828b} 17 | .shj-syn-insert, 18 | .shj-syn-type, 19 | .shj-syn-func, 20 | .shj-syn-bool {color: #71d58a} 21 | .shj-syn-num {color: #b581fd} 22 | .shj-syn-oper {color: #80c6ff} 23 | .shj-syn-str {color: #4dacfa} 24 | -------------------------------------------------------------------------------- /src/themes/default.css: -------------------------------------------------------------------------------- 1 | [class*="shj-lang-"] { 2 | white-space: pre; 3 | margin: 10px 0; 4 | border-radius: 10px; 5 | padding: 30px 20px; 6 | background: white; 7 | color: #112; 8 | box-shadow: 0 0 5px #0001; 9 | text-shadow: none; 10 | font: normal 18px Consolas, "Courier New", Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; 11 | line-height: 24px; 12 | box-sizing: border-box; 13 | max-width: min(100%, 100vw) 14 | } 15 | .shj-inline { 16 | margin: 0; 17 | padding: 2px 5px; 18 | display: inline-block; 19 | border-radius: 5px 20 | } 21 | 22 | [class*="shj-lang-"]::selection, 23 | [class*="shj-lang-"] ::selection {background: #bdf5} 24 | [class*="shj-lang-"] > div { 25 | display: flex; 26 | overflow: auto 27 | } 28 | [class*="shj-lang-"] > div :last-child { 29 | flex: 1; 30 | outline: none 31 | } 32 | .shj-numbers { 33 | padding-left: 5px; 34 | counter-reset: line 35 | } 36 | .shj-numbers div {padding-right: 5px} 37 | .shj-numbers div::before { 38 | color: #999; 39 | display: block; 40 | content: counter(line); 41 | opacity: .5; 42 | text-align: right; 43 | margin-right: 5px; 44 | counter-increment: line 45 | } 46 | 47 | .shj-syn-cmnt {font-style: italic} 48 | 49 | .shj-syn-err, 50 | .shj-syn-kwd {color: #e16} 51 | .shj-syn-num, 52 | .shj-syn-class {color: #f60} 53 | .shj-numbers, 54 | .shj-syn-cmnt {color: #999} 55 | .shj-syn-insert, 56 | .shj-syn-str {color: #7d8} 57 | .shj-syn-bool {color: #3bf} 58 | .shj-syn-type, 59 | .shj-syn-oper {color: #5af} 60 | .shj-syn-section, 61 | .shj-syn-func {color: #84f} 62 | .shj-syn-deleted, 63 | .shj-syn-var {color: #f44} 64 | 65 | .shj-oneline {padding: 12px 10px} 66 | .shj-lang-http.shj-oneline .shj-syn-kwd { 67 | background: #25f; 68 | color: #fff; 69 | padding: 5px 7px; 70 | border-radius: 5px 71 | } 72 | -------------------------------------------------------------------------------- /src/themes/default.js: -------------------------------------------------------------------------------- 1 | import col from './termcolor.js' 2 | 3 | export default { 4 | deleted: col.red, 5 | var: col.red, 6 | err: col.red, 7 | kwd: col.red, 8 | num: col.yellow, 9 | class: col.yellow, 10 | cmnt: col.gray, 11 | insert: col.green, 12 | str: col.green, 13 | bool: col.cyan, 14 | type: col.blue, 15 | oper: col.blue, 16 | section: col.magenta, 17 | func: col.magenta 18 | } -------------------------------------------------------------------------------- /src/themes/github-dark.css: -------------------------------------------------------------------------------- 1 | @import 'default.css'; 2 | 3 | [class*="shj-lang-"] { 4 | color: #c9d1d9; 5 | background: #161b22 6 | } 7 | [class*="shj-lang-"]:before {color: #6f9aff} 8 | 9 | .shj-syn-insert {color: #98c379} 10 | .shj-syn-deleted, 11 | .shj-syn-err, 12 | .shj-syn-kwd {color: #ff7b72} 13 | .shj-syn-class {color: #ffa657} 14 | .shj-numbers, 15 | .shj-syn-cmnt {color: #8b949e} 16 | .shj-syn-type, 17 | .shj-syn-oper, 18 | .shj-syn-num, 19 | .shj-syn-section, 20 | .shj-syn-var, 21 | .shj-syn-bool {color: #79c0ff} 22 | .shj-syn-str {color: #a5d6ff} 23 | .shj-syn-func {color: #d2a8ff} 24 | -------------------------------------------------------------------------------- /src/themes/github-dim.css: -------------------------------------------------------------------------------- 1 | @import 'github-dark.css'; 2 | 3 | [class*="shj-lang-"] {background: #22272e} 4 | -------------------------------------------------------------------------------- /src/themes/github-light.css: -------------------------------------------------------------------------------- 1 | @import 'default.css'; 2 | 3 | [class*="shj-lang-"] { 4 | color: #24292f; 5 | background: #fff 6 | } 7 | 8 | .shj-syn-deleted, 9 | .shj-syn-err, 10 | .shj-syn-kwd {color: #cf222e} 11 | .shj-syn-class {color: #953800} 12 | .shj-numbers, 13 | .shj-syn-cmnt {color: #6e7781} 14 | .shj-syn-type, 15 | .shj-syn-oper, 16 | .shj-syn-num, 17 | .shj-syn-section, 18 | .shj-syn-var, 19 | .shj-syn-bool {color: #0550ae} 20 | .shj-syn-str {color: #0a3069} 21 | .shj-syn-func {color: #8250df} 22 | -------------------------------------------------------------------------------- /src/themes/termcolor.js: -------------------------------------------------------------------------------- 1 | export default { 2 | black: '\x1b[30m', 3 | red: '\x1b[31m', 4 | green: '\x1b[32m', 5 | gray: '\x1b[90m', 6 | yellow: '\x1b[33m', 7 | blue: '\x1b[34m', 8 | magenta: '\x1b[35m', 9 | cyan: '\x1b[36m', 10 | white: '\x1b[37m' 11 | } -------------------------------------------------------------------------------- /src/themes/visual-studio-dark.css: -------------------------------------------------------------------------------- 1 | @import 'default.css'; 2 | 3 | [class*="shj-lang-"] { 4 | color: #d4d4d4; 5 | background: #1e1e1e 6 | } 7 | [class*="shj-lang-"]:before {color: #6f9aff} 8 | 9 | .shj-syn-insert {color: #98c379} 10 | .shj-syn-var {color: #9cdcfe} 11 | .shj-syn-oper {color: #d4d4d4} 12 | .shj-syn-num, 13 | .shj-syn-kwd {color: #569cd6} 14 | .shj-syn-section, 15 | .shj-syn-type, 16 | .shj-syn-class {color: #4fc1ff} 17 | .shj-numbers, 18 | .shj-syn-cmnt {color: #6a9955} 19 | .shj-syn-bool {color: #b5cea8} 20 | .shj-syn-deleted, 21 | .shj-syn-err, 22 | .shj-syn-str {color: #ce9178} 23 | .shj-syn-func {color: #dcdcaa} 24 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // Change this to match your project 3 | "include": ["src/**/*"], 4 | "compilerOptions": { 5 | "rootDir": "src", 6 | // Tells TypeScript to read JS files, as 7 | // normally they are ignored as source files 8 | "allowJs": true, 9 | // Generate d.ts files 10 | "declaration": true, 11 | // This compiler run should 12 | // only output d.ts files 13 | "emitDeclarationOnly": true, 14 | // Types should go into this directory. 15 | // Removing this would place the .d.ts files 16 | // next to the .js files 17 | "outDir": "dist", 18 | // go to js file when using IDE functions like 19 | // "Go to Definition" in VSCode 20 | "declarationMap": true, 21 | "lib": ["es2019"] 22 | } 23 | } --------------------------------------------------------------------------------