Skip to content

Commit

Permalink
Merge pull request #1 from skippi/update-syntax
Browse files Browse the repository at this point in the history
Update syntax
  • Loading branch information
srliao authored Aug 5, 2022
2 parents 6ae9a4d + 2639c03 commit 9e6c728
Show file tree
Hide file tree
Showing 143 changed files with 6,453 additions and 240 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
2 changes: 1 addition & 1 deletion .github/workflows/danger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
with:
fetch-depth: 0
# create a new branch called pr from the remote PR branch
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
branches: [ master ]

permissions:
contents: read

jobs:
tests:

Expand All @@ -16,9 +19,9 @@ jobs:
node-version: [10.x, 12.x, 14.x, 16.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
Expand All @@ -33,9 +36,9 @@ jobs:
node-version: [10.x, 12.x, 14.x, 16.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
Expand All @@ -50,9 +53,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js 14.x
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 14.x
- run: npm ci
Expand All @@ -63,9 +66,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js 14.x
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 14.x
- run: npm ci
Expand Down
113 changes: 101 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,129 @@
# Prism Changelog


## 1.28.0 (2022-04-17)

### New components

* __Ado__ & __Mata__ (Stata) ([#3383](https://github.com/PrismJS/prism/issues/3383)) [`63806d57`](https://github.com/PrismJS/prism/commit/63806d57)
* __ARM Assembly__ ([#3376](https://github.com/PrismJS/prism/issues/3376)) [`554ff324`](https://github.com/PrismJS/prism/commit/554ff324)
* __Arturo__ ([#3403](https://github.com/PrismJS/prism/issues/3403)) [`e2fe1f79`](https://github.com/PrismJS/prism/commit/e2fe1f79)
* __AWK__ & __GAWK__ ([#3374](https://github.com/PrismJS/prism/issues/3374)) [`ea8a0f40`](https://github.com/PrismJS/prism/commit/ea8a0f40)
* __Cooklang__ ([#3337](https://github.com/PrismJS/prism/issues/3337)) [`4eb928c3`](https://github.com/PrismJS/prism/commit/4eb928c3)
* __CUE__ ([#3375](https://github.com/PrismJS/prism/issues/3375)) [`a1340666`](https://github.com/PrismJS/prism/commit/a1340666)
* __gettext__ ([#3369](https://github.com/PrismJS/prism/issues/3369)) [`dfef9b61`](https://github.com/PrismJS/prism/commit/dfef9b61)
* __GNU Linker Script__ ([#3373](https://github.com/PrismJS/prism/issues/3373)) [`33f2cf95`](https://github.com/PrismJS/prism/commit/33f2cf95)
* __Odin__ ([#3424](https://github.com/PrismJS/prism/issues/3424)) [`8a3fef6d`](https://github.com/PrismJS/prism/commit/8a3fef6d)
* __PlantUML__ ([#3372](https://github.com/PrismJS/prism/issues/3372)) [`0d49553c`](https://github.com/PrismJS/prism/commit/0d49553c)
* __ReScript__ ([#3435](https://github.com/PrismJS/prism/issues/3435)) [`cbef9af7`](https://github.com/PrismJS/prism/commit/cbef9af7)
* __SuperCollider__ ([#3371](https://github.com/PrismJS/prism/issues/3371)) [`1b1d6731`](https://github.com/PrismJS/prism/commit/1b1d6731)

### Updated components

* __.properties__
* Use `key`, `value` for token names; `attr-name`, `attr-value` as aliases ([#3377](https://github.com/PrismJS/prism/issues/3377)) [`b94a664d`](https://github.com/PrismJS/prism/commit/b94a664d)
* __ABAP__
* Sorted keyword list ([#3368](https://github.com/PrismJS/prism/issues/3368)) [`7bda2bf1`](https://github.com/PrismJS/prism/commit/7bda2bf1)
* __Ada__
* Changed `attr-name` to `attribute`; Use `attr-name` as alias ([#3381](https://github.com/PrismJS/prism/issues/3381)) [`cde0b5b2`](https://github.com/PrismJS/prism/commit/cde0b5b2)
* Added `or` keyword ([#3380](https://github.com/PrismJS/prism/issues/3380)) [`c30b736f`](https://github.com/PrismJS/prism/commit/c30b736f)
* __Atmel AVR Assembly__
* Fixed `&=` and `|=` operators ([#3395](https://github.com/PrismJS/prism/issues/3395)) [`8c4ae5a5`](https://github.com/PrismJS/prism/commit/8c4ae5a5)
* __AutoHotkey__
* Use standard tokens ([#3385](https://github.com/PrismJS/prism/issues/3385)) [`61c460e8`](https://github.com/PrismJS/prism/commit/61c460e8)
* Use general pattern instead of name list for directives ([#3384](https://github.com/PrismJS/prism/issues/3384)) [`7ac84dda`](https://github.com/PrismJS/prism/commit/7ac84dda)
* __CFScript__
* Simplified operator regex ([#3396](https://github.com/PrismJS/prism/issues/3396)) [`6a215fe0`](https://github.com/PrismJS/prism/commit/6a215fe0)
* __CMake__
* Simplified `variable` and `operator` regexes ([#3398](https://github.com/PrismJS/prism/issues/3398)) [`8e59744b`](https://github.com/PrismJS/prism/commit/8e59744b)
* __Erlang__
* Added `begin` keyword ([#3387](https://github.com/PrismJS/prism/issues/3387)) [`cf38d059`](https://github.com/PrismJS/prism/commit/cf38d059)
* __Excel Formula__
* Use more fitting aliases for `function-name`, `range`, and `cell` ([#3391](https://github.com/PrismJS/prism/issues/3391)) [`ef0ec02a`](https://github.com/PrismJS/prism/commit/ef0ec02a)
* __Flow__
* Changed alias of `type` to `class-name` ([#3390](https://github.com/PrismJS/prism/issues/3390)) [`ce41434d`](https://github.com/PrismJS/prism/commit/ce41434d)
* Recognise `[Ss]ymbol` as a type ([#3388](https://github.com/PrismJS/prism/issues/3388)) [`3916883a`](https://github.com/PrismJS/prism/commit/3916883a)
* __GEDCOM__
* Update `tag` to `record` ([#3386](https://github.com/PrismJS/prism/issues/3386)) [`f8f95340`](https://github.com/PrismJS/prism/commit/f8f95340)
* __Groovy__
* Added string interpolation without hook ([#3366](https://github.com/PrismJS/prism/issues/3366)) [`5617765f`](https://github.com/PrismJS/prism/commit/5617765f)
* __Handlebars__
* Added Mustache alias ([#3422](https://github.com/PrismJS/prism/issues/3422)) [`cb5229af`](https://github.com/PrismJS/prism/commit/cb5229af)
* __Java__
* Improved class name detection ([#3351](https://github.com/PrismJS/prism/issues/3351)) [`4cb3d038`](https://github.com/PrismJS/prism/commit/4cb3d038)
* Fixed `record` false positives ([#3348](https://github.com/PrismJS/prism/issues/3348)) [`3bd8fdb1`](https://github.com/PrismJS/prism/commit/3bd8fdb1)
* __JavaScript__
* Added support for new regex syntax ([#3399](https://github.com/PrismJS/prism/issues/3399)) [`ca78cde6`](https://github.com/PrismJS/prism/commit/ca78cde6)
* __Keyman__
* Added new keywords ([#3401](https://github.com/PrismJS/prism/issues/3401)) [`bac36827`](https://github.com/PrismJS/prism/commit/bac36827)
* __MEL__
* Improved functions, code, and comments ([#3393](https://github.com/PrismJS/prism/issues/3393)) [`8e648dab`](https://github.com/PrismJS/prism/commit/8e648dab)
* __NEON__
* Change alias of `key` to `property` ([#3394](https://github.com/PrismJS/prism/issues/3394)) [`1c533f4a`](https://github.com/PrismJS/prism/commit/1c533f4a)
* __PHP__
* Added `never` return type + minor fix of named arguments ([#3421](https://github.com/PrismJS/prism/issues/3421)) [`4ffab525`](https://github.com/PrismJS/prism/commit/4ffab525)
* Added `readonly` keyword ([#3349](https://github.com/PrismJS/prism/issues/3349)) [`4c3f1969`](https://github.com/PrismJS/prism/commit/4c3f1969)
* __PureBasic__
* Added support for pointer to string operator ([#3362](https://github.com/PrismJS/prism/issues/3362)) [`499b1fa0`](https://github.com/PrismJS/prism/commit/499b1fa0)
* __Razor C#__
* Added support for `@helper` and inline C# inside attribute values ([#3355](https://github.com/PrismJS/prism/issues/3355)) [`31a38d0c`](https://github.com/PrismJS/prism/commit/31a38d0c)
* __VHDL__
* Add `private`, `view` keywords; Distinguish `attribute` from `keyword` ([#3389](https://github.com/PrismJS/prism/issues/3389)) [`d1a5ce30`](https://github.com/PrismJS/prism/commit/d1a5ce30)
* __Wolfram language__
* Simplified `operator` regex ([#3397](https://github.com/PrismJS/prism/issues/3397)) [`10ae6da3`](https://github.com/PrismJS/prism/commit/10ae6da3)

### Updated plugins

* __Autolinker__
* Fixed URL regex to match more valid URLs ([#3358](https://github.com/PrismJS/prism/issues/3358)) [`17ed9160`](https://github.com/PrismJS/prism/commit/17ed9160)
* __Command Line__
* Add support for command continuation prefix ([#3344](https://github.com/PrismJS/prism/issues/3344)) [`b53832cd`](https://github.com/PrismJS/prism/commit/b53832cd)
* Increased prompt opacity ([#3352](https://github.com/PrismJS/prism/issues/3352)) [`f95dd190`](https://github.com/PrismJS/prism/commit/f95dd190)
* __Keep Markup__
* Use original nodes instead of clones ([#3365](https://github.com/PrismJS/prism/issues/3365)) [`8a843a17`](https://github.com/PrismJS/prism/commit/8a843a17)

### Other

* __Infrastructure__
* Use terser ([#3407](https://github.com/PrismJS/prism/issues/3407)) [`11c54624`](https://github.com/PrismJS/prism/commit/11c54624)
* Tests: Cache results for exp backtracking check ([#3356](https://github.com/PrismJS/prism/issues/3356)) [`ead22e1e`](https://github.com/PrismJS/prism/commit/ead22e1e)
* __Website__
* More documentation for language definitons ([#3427](https://github.com/PrismJS/prism/issues/3427)) [`333bd590`](https://github.com/PrismJS/prism/commit/333bd590)

## 1.27.0 (2022-02-17)

### New components

* __UO Razor Script__ (#3309) [`3f8cc5a0`](https://github.com/PrismJS/prism/commit/3f8cc5a0)
* __UO Razor Script__ ([#3309](https://github.com/PrismJS/prism/issues/3309)) [`3f8cc5a0`](https://github.com/PrismJS/prism/commit/3f8cc5a0)

### Updated components

* __AutoIt__
* Allow hyphen in directive (#3308) [`bcb2e2c8`](https://github.com/PrismJS/prism/commit/bcb2e2c8)
* Allow hyphen in directive ([#3308](https://github.com/PrismJS/prism/issues/3308)) [`bcb2e2c8`](https://github.com/PrismJS/prism/commit/bcb2e2c8)
* __EditorConfig__
* Change alias of `section` from `keyword` to `selector` (#3305) [`e46501b9`](https://github.com/PrismJS/prism/commit/e46501b9)
* Change alias of `section` from `keyword` to `selector` ([#3305](https://github.com/PrismJS/prism/issues/3305)) [`e46501b9`](https://github.com/PrismJS/prism/commit/e46501b9)
* __Ini__
* Swap out `header` for `section` (#3304) [`deb3a97f`](https://github.com/PrismJS/prism/commit/deb3a97f)
* Swap out `header` for `section` ([#3304](https://github.com/PrismJS/prism/issues/3304)) [`deb3a97f`](https://github.com/PrismJS/prism/commit/deb3a97f)
* __MongoDB__
* Added v5 support (#3297) [`8458c41f`](https://github.com/PrismJS/prism/commit/8458c41f)
* Added v5 support ([#3297](https://github.com/PrismJS/prism/issues/3297)) [`8458c41f`](https://github.com/PrismJS/prism/commit/8458c41f)
* __PureBasic__
* Added missing keyword and fixed constants ending with `$` (#3320) [`d6c53726`](https://github.com/PrismJS/prism/commit/d6c53726)
* Added missing keyword and fixed constants ending with `$` ([#3320](https://github.com/PrismJS/prism/issues/3320)) [`d6c53726`](https://github.com/PrismJS/prism/commit/d6c53726)
* __Scala__
* Added support for interpolated strings (#3293) [`441a1422`](https://github.com/PrismJS/prism/commit/441a1422)
* Added support for interpolated strings ([#3293](https://github.com/PrismJS/prism/issues/3293)) [`441a1422`](https://github.com/PrismJS/prism/commit/441a1422)
* __Systemd configuration file__
* Swap out `operator` for `punctuation` (#3306) [`2eb89e15`](https://github.com/PrismJS/prism/commit/2eb89e15)
* Swap out `operator` for `punctuation` ([#3306](https://github.com/PrismJS/prism/issues/3306)) [`2eb89e15`](https://github.com/PrismJS/prism/commit/2eb89e15)

### Updated plugins

* __Command Line__
* Escape markup in command line output (#3341) [`e002e78c`](https://github.com/PrismJS/prism/commit/e002e78c)
* Add support for line continuation and improved colors (#3326) [`1784b175`](https://github.com/PrismJS/prism/commit/1784b175)
* Added span around command and output (#3312) [`82d0ca15`](https://github.com/PrismJS/prism/commit/82d0ca15)
* Escape markup in command line output ([#3341](https://github.com/PrismJS/prism/issues/3341)) [`e002e78c`](https://github.com/PrismJS/prism/commit/e002e78c)
* Add support for line continuation and improved colors ([#3326](https://github.com/PrismJS/prism/issues/3326)) [`1784b175`](https://github.com/PrismJS/prism/commit/1784b175)
* Added span around command and output ([#3312](https://github.com/PrismJS/prism/issues/3312)) [`82d0ca15`](https://github.com/PrismJS/prism/commit/82d0ca15)

### Other

* __Core__
* Added better error message for missing grammars (#3311) [`2cc4660b`](https://github.com/PrismJS/prism/commit/2cc4660b)
* Added better error message for missing grammars ([#3311](https://github.com/PrismJS/prism/issues/3311)) [`2cc4660b`](https://github.com/PrismJS/prism/commit/2cc4660b)

## 1.26.0 (2022-01-06)

Expand Down
11 changes: 11 additions & 0 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Maintainers (alphabetical by user name)

- [@Golmote](https://github.com/Golmote)
- [@JaKXz](https://github.com/JaKXz) Jason Kurian
- [@LeaVerou](https://github.com/LeaVerou) Lea Verou (original author)
- [@mAAdhaTTah](https://github.com/mAAdhaTTah) James DiGioia <[email protected]>
- [@RunDevelopment](https://github.com/RunDevelopment) Michael Schmidt <[email protected]>

## Former Maintainers

- [@zeitgeist87](https://github.com/zeitgeist87) Andreas Rohner
51 changes: 51 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Security Policy

## What is considered a vulnerability?

There are some types of [low-severity][severity] vulnerabilities that we will not acknowledge as CVE and treat as bugs instead.
All vulnerabilities with a severity of medium and above will of course be acknowledged and fixed.

Please see the below section on how we treat [ReDoS] vulnerabilities.

If you are unsure whether a vulnerability you found qualifies, please report it as a vulnerability via email (see below).

### ReDoS

Prism is a regex-based syntax highlighter.
As such, the main types of vulnerabilities reported to us are [ReDoS] vulnerabilities ([CWE-1333](https://cwe.mitre.org/data/definitions/1333.html)), aka slow regexes.

However, not all ReDoS is created equal.
A slow regex can be have a [worst-case time complexity](https://en.wikipedia.org/wiki/Time_complexity) anywhere from _O(n<sup>2</sup>)_ to _2<sup>O(n)</sup>_.
This matters because a worst-case time complexity _≥ O(n<sup>3</sup>)_ is a [high severity][severity] vulnerability while _O(n<sup>2</sup>)_ is low or medium severity in the context of Prism.
Furthermore, worst-case time complexities of _O(n<sup>2</sup>)_ can have 2 different causes: backtracking or moving.
Backtracking is always fixable by rewriting the slow regex but moving is not (except in special cases).

Because of their lower severity and the fact that moving is difficult or impossible to fix, we will treat regexes with worst-case time complexity of _O(n<sup>2</sup>)_ caused by moving as regular bugs and not as vulnerabilities.
Please report them as [bugs](https://github.com/PrismJS/prism/issues/new/choose) instead of as vulnerabilities.

If you found a slow regex but are unsure about the worst-case time complexity or its cause, please report it as a vulnerability via email (see below).


## Reporting a Vulnerability

***DO NOT CREATE AN ISSUE*** to report a vulnerability.

Instead, please send an email to at least one of [Prism's maintainers](MAINTAINERS.md).
See [Responsible Disclosure](https://en.wikipedia.org/wiki/Responsible_disclosure) for more details.

### Procedure

1. After you send an email [a maintainer](MAINTAINERS.md), you should receive a response from the [Prism team](https://github.com/orgs/PrismJS/people) within 3 days.

We may require further information, so please keep in touch with us until the vulnerability has been fixed.

2. After the vulnerability has been confirmed and accepted, we will create a [security advisory](https://docs.github.com/en/code-security/security-advisories/about-github-security-advisories) and start working on a fix.

You will be [added as a collaborator](https://docs.github.com/en/code-security/security-advisories/adding-a-collaborator-to-a-security-advisory) (this requires a GitHub account).
At this point, all communication will occur using comments on the advisory and the [temporary private fork](https://docs.github.com/en/code-security/security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-security-vulnerability).

3. After the fix has been merged, we will make a new release and publish the security advisory within one week.


[ReDoS]: https://en.wikipedia.org/wiki/ReDoS
[severity]: https://www.imperva.com/learn/application-security/cve-cvss-vulnerability/
2 changes: 1 addition & 1 deletion components.js

Large diffs are not rendered by default.

28 changes: 27 additions & 1 deletion components.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,10 @@
},
"owner": "RunDevelopment"
},
"bbj": {
"title": "BBj",
"owner": "hyyan"
},
"bicep": {
"title": "Bicep",
"owner": "johnnyreilly"
Expand Down Expand Up @@ -580,6 +584,11 @@
"alias": "go-mod",
"owner": "RunDevelopment"
},
"gradle": {
"title": "Gradle",
"require": "clike",
"owner": "zeabdelkhalek-badido18"
},
"graphql": {
"title": "GraphQL",
"optional": "markdown",
Expand Down Expand Up @@ -958,6 +967,10 @@
"title": "Mermaid",
"owner": "RunDevelopment"
},
"metafont": {
"title": "METAFONT",
"owner": "LaeriExNihilo"
},
"mizar": {
"title": "Mizar",
"owner": "Golmote"
Expand Down Expand Up @@ -1034,6 +1047,10 @@
"title": "OCaml",
"owner": "Golmote"
},
"odin": {
"title": "Odin",
"owner": "edukisto"
},
"opencl": {
"title": "OpenCL",
"require": "c",
Expand Down Expand Up @@ -1287,6 +1304,11 @@
"alias": "rpy",
"owner": "HyuchiaDiego"
},
"rescript": {
"title": "ReScript",
"alias": "res",
"owner": "vmarcosp"
},
"rest": {
"title": "reST (reStructuredText)",
"owner": "Golmote"
Expand Down Expand Up @@ -1330,7 +1352,7 @@
"owner": "Golmote"
},
"scss": {
"title": "Sass (Scss)",
"title": "Sass (SCSS)",
"require": "css",
"optional": "css-extras",
"owner": "MoOx"
Expand Down Expand Up @@ -1614,6 +1636,10 @@
"alias": "webidl",
"owner": "RunDevelopment"
},
"wgsl": {
"title": "WGSL",
"owner": "Dr4gonthree"
},
"wiki": {
"title": "Wiki markup",
"require": "markup",
Expand Down
8 changes: 4 additions & 4 deletions components/prism-asciidoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

var asciidoc = Prism.languages.asciidoc = {
'comment-block': {
pattern: /^(\/{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1/m,
pattern: /^(\/{4,})$[\s\S]*?^\1/m,
alias: 'comment'
},
'table': {
Expand All @@ -47,23 +47,23 @@
},

'passthrough-block': {
pattern: /^(\+{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,
pattern: /^(\+{4,})$[\s\S]*?^\1$/m,
inside: {
'punctuation': /^\++|\++$/
// See rest below
}
},
// Literal blocks and listing blocks
'literal-block': {
pattern: /^(-{4,}|\.{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,
pattern: /^(-{4,}|\.{4,})$[\s\S]*?^\1$/m,
inside: {
'punctuation': /^(?:-+|\.+)|(?:-+|\.+)$/
// See rest below
}
},
// Sidebar blocks, quote blocks, example blocks and open blocks
'other-block': {
pattern: /^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,
pattern: /^(--|\*{4,}|_{4,}|={4,})$[\s\S]*?^\1$/m,
inside: {
'punctuation': /^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/
// See rest below
Expand Down
Loading

0 comments on commit 9e6c728

Please sign in to comment.