Skip to content

Commit

Permalink
Merge branch 'master' into copy-to-clipboard-styling
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Mar 17, 2021
2 parents 4a0d083 + 5943f4c commit 37da32b
Show file tree
Hide file tree
Showing 60 changed files with 2,082 additions and 969 deletions.
2 changes: 1 addition & 1 deletion components.js

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions components.json
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,10 @@
"title": "Factor",
"owner": "catb0t"
},
"false": {
"title": "False",
"owner": "edukisto"
},
"firestore-security-rules": {
"title": "Firestore security rules",
"require": "clike",
Expand Down Expand Up @@ -805,8 +809,7 @@
},
"nginx": {
"title": "nginx",
"owner": "westonganger",
"require": "clike"
"owner": "volado"
},
"nim": {
"title": "Nim",
Expand Down Expand Up @@ -1028,6 +1031,10 @@
"title": "Regex",
"owner": "RunDevelopment"
},
"rego": {
"title": "Rego",
"owner": "JordanSh"
},
"renpy": {
"title": "Ren'py",
"alias": "rpy",
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.

32 changes: 32 additions & 0 deletions components/prism-false.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
(function (Prism) {
/**
* Based on the manual by Wouter van Oortmerssen.
*
* @see {@link https://github.com/PrismJS/prism/issues/2801#issue-829717504}
*/
Prism.languages['false'] = {
'comment': {
pattern: /\{[^}]*\}/
},
'string': {
pattern: /"[^"]*"/,
greedy: true
},
'character-code': {
pattern: /'[\S\s]/,
alias: 'number'
},
'assembler-code': {
pattern: /\d+`/,
alias: 'important'
},
'number': /\d+/,
'operator': /[-!#$%&'*+,./:;=>?@\\^_`|~ßø]/,
'punctuation': /\[|\]/,
'variable': /[a-z]/,
'non-standard': {
pattern: /[()<BDO®]/,
alias: 'bold'
}
};
}(Prism));
1 change: 1 addition & 0 deletions components/prism-false.min.js

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

Loading

0 comments on commit 37da32b

Please sign in to comment.