Skip to content

Commit

Permalink
Merge branch 'master' into coq
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Mar 25, 2021
2 parents c84df88 + 53d34b2 commit 66c8a76
Show file tree
Hide file tree
Showing 170 changed files with 7,338 additions and 1,200 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ Prism depends on community contributions to expand and cover a wider array of us

Thank you so much for contributing!!

### Software requirements

Prism will run on [almost any browser](https://prismjs.com/#features-full) and Node.js version but you need the following software to contribute:

- Node.js >= 10.x
- npm >= 6.x

## Translations

* [简体中文](https://www.awesomes.cn/repo/PrismJS/prism) (if unavailable, see [here](https://deepmind.t-salon.cc/article/113))
Binary file added assets/img/logo-mysql.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion components.js

Large diffs are not rendered by default.

36 changes: 33 additions & 3 deletions components.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@
"title": "CMake",
"owner": "mjrogozinski"
},
"cobol": {
"title": "COBOL",
"owner": "RunDevelopment"
},
"coffeescript": {
"title": "CoffeeScript",
"require": "javascript",
Expand Down Expand Up @@ -291,6 +295,10 @@
"modify": "css",
"owner": "milesj"
},
"csv": {
"title": "CSV",
"owner": "RunDevelopment"
},
"cypher": {
"title": "Cypher",
"owner": "RunDevelopment"
Expand Down Expand Up @@ -461,7 +469,7 @@
},
"graphql": {
"title": "GraphQL",
"optional": ["markdown"],
"optional": "markdown",
"owner": "Golmote"
},
"groovy": {
Expand Down Expand Up @@ -601,6 +609,10 @@
"title": "Java stack trace",
"owner": "RunDevelopment"
},
"jexl": {
"title": "Jexl",
"owner": "czosel"
},
"jolie": {
"title": "Jolie",
"require": "clike",
Expand Down Expand Up @@ -733,6 +745,10 @@
"title": "LLVM IR",
"owner": "porglezomp"
},
"log": {
"title": "Log file",
"owner": "RunDevelopment"
},
"lolcode": {
"title": "LOLCODE",
"owner": "Golmote"
Expand Down Expand Up @@ -811,10 +827,13 @@
"title": "NEON",
"owner": "nette"
},
"nevod": {
"title": "Nevod",
"owner": "nezaboodka"
},
"nginx": {
"title": "nginx",
"owner": "westonganger",
"require": "clike"
"owner": "volado"
},
"nim": {
"title": "Nim",
Expand Down Expand Up @@ -847,6 +866,11 @@
],
"owner": "Milania1"
},
"openqasm": {
"title": "OpenQasm",
"alias": "qasm",
"owner": "RunDevelopment"
},
"oz": {
"title": "Oz",
"owner": "Golmote"
Expand Down Expand Up @@ -989,6 +1013,12 @@
"alias": "py",
"owner": "multipetros"
},
"qsharp": {
"title": "Q#",
"require": "clike",
"alias": "qs",
"owner": "fedonman"
},
"q": {
"title": "Q (kdb+ database)",
"owner": "Golmote"
Expand Down
17 changes: 16 additions & 1 deletion components/prism-bash.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,25 @@
},
// “Normal” string
{
pattern: /(^|[^\\](?:\\\\)*)(["'])(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|(?!\2)[^\\`$])*\2/,
// https://www.gnu.org/software/bash/manual/html_node/Double-Quotes.html
pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,
lookbehind: true,
greedy: true,
inside: insideString
},
{
// https://www.gnu.org/software/bash/manual/html_node/Single-Quotes.html
pattern: /(^|[^$\\])'[^']*'/,
lookbehind: true,
greedy: true
},
{
// https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html
pattern: /\$'(?:[^'\\]|\\[\s\S])*'/,
greedy: true,
inside: {
'entity': insideString.entity
}
}
],
'environment': {
Expand Down
2 changes: 1 addition & 1 deletion components/prism-bash.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 53 additions & 0 deletions components/prism-cobol.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Prism.languages.cobol = {
'comment': {
pattern: /\*>.*|(^[ \t]*)\*.*/m,
lookbehind: true,
greedy: true
},
'string': {
pattern: /[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i,
greedy: true
},

'level': {
pattern: /(^[ \t]*)\d+\b/m,
lookbehind: true,
greedy: true,
alias: 'number'
},

'class-name': {
// https://github.com/antlr/grammars-v4/blob/42edd5b687d183b5fa679e858a82297bd27141e7/cobol85/Cobol85.g4#L1015
pattern: /(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i,
lookbehind: true,
inside: {
'number': {
pattern: /(\()\d+/,
lookbehind: true
},
'punctuation': /[()]/
}
},

'keyword': {
pattern: /(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOUNDS|BOTTOM|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COLLATING|COL|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOP|ERASE|ERROR|EOL|EOS|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTIONNAME|FUNCTION-POINTER|GENERATE|GOBACK|GIVING|GLOBAL|GO|GRID|GROUP|HEADING|HIGHLIGHT|HIGH-VALUE|HIGH-VALUES|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINES|LINE-COUNTER|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOWER|LOWLIGHT|LOW-VALUE|LOW-VALUES|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|POSITION|POSITIVE|PORT|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|READER|REMOTE|RD|REAL|READ|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|REVERSE-VIDEO|RESET|RETURN|RETURN-CODE|RETURNING|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TASK|TAPE|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYMMDD|YYYYDDD|ZERO-FILL|ZEROS|ZEROES)(?![\w-])/i,
lookbehind: true
},

'boolean': {
pattern: /(^|[^\w-])(?:false|true)(?![\w-])/i,
lookbehind: true
},
'number': {
pattern: /(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i,
lookbehind: true
},
'operator': [
/<>|[<>]=?|[=+*/&]/,
{
pattern: /(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,
lookbehind: true
}
],
'punctuation': /[.:,()]/
};
Loading

0 comments on commit 66c8a76

Please sign in to comment.