Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: PrismJS/prism
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: aba55105897299e61815e873f8fcce7063227927
Choose a base ref
...
head repository: PrismJS/prism
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 88a17b4ff586c8bbd0faf1b1524cee9e039fa580
Choose a head ref

Commits on Jul 24, 2019

  1. npm: Updated dependencies to fix 122 vulnerabilities (#1997)

    This updates mocha and its dependencies to fix 122 vulnerabilities.
    RunDevelopment authored Jul 24, 2019
    Copy the full SHA
    3af5d74 View commit details

Commits on Aug 5, 2019

  1. Fixed alias example in extending page (#2011)

    This fixes the example on how to add a language alias to a language definition.
    jakubklimek authored and RunDevelopment committed Aug 5, 2019
    Copy the full SHA
    7cb65ee View commit details

Commits on Aug 6, 2019

  1. Added RDF Turtle/TriG language (#2012)

    This adds support for the RDF Turtle/TriG language.
    jakubklimek authored and RunDevelopment committed Aug 6, 2019
    Copy the full SHA
    508d57a View commit details

Commits on Aug 8, 2019

  1. SAS: Major improvements (#1981)

    This makes various improvements to the SAS language definition such as adding support for embedded SQL, missing keyword and language elements, more granular tokenizing, and many more.
    cedporter authored and RunDevelopment committed Aug 8, 2019
    Copy the full SHA
    076f615 View commit details
  2. SAS: Fixed proc-args token by removing backreferences from string p…

    …attern (#2013)
    
    Because the `proc-args` pattern has a lookbehind capturing group, the `\1` in the string pattern will refer to the lookbehind group. This PR fixes this bug by replacing the old string pattern with old that doesn't use backreferences.
    RunDevelopment authored Aug 8, 2019
    Copy the full SHA
    af5a36a View commit details

Commits on Aug 14, 2019

  1. Added support for GDScript (#2006)

    This adds support for the GDScript language.
    RunDevelopment authored Aug 14, 2019
    Copy the full SHA
    e2b99f4 View commit details

Commits on Aug 17, 2019

  1. CSS Extras & PHP: Fixed too greedy number token (#2009)

    This fixes the too greedy number tokenization of CSS Extras which cause the placeholders of PHP (via markup templating) to be partly tokenized.
    
    The CSS extras number pattern was adjusted to solve the issue.
    RunDevelopment authored Aug 17, 2019
    Copy the full SHA
    ebe363f View commit details
  2. Added support for Firestore security rules (#2010)

    This adds support for Google Cloud Firestore security rules.
    RunDevelopment authored Aug 17, 2019
    Copy the full SHA
    9f72258 View commit details

Commits on Aug 29, 2019

  1. Python: Fixed decorators (#2018)

    This adds a missing multiline flag to support more than one decorator.
    RunDevelopment authored Aug 29, 2019
    Copy the full SHA
    5b8a16d View commit details
  2. Less: Fixed exponential backtracking (#2016)

    This fixes the exponential backtracking in 2 of Less' patterns.
    RunDevelopment authored Aug 29, 2019
    Copy the full SHA
    d03d19b View commit details
  3. Added suppprt for Zig (#2019)

    This adds support for the Zig language.
    https://ziglang.org/
    RunDevelopment authored Aug 29, 2019
    Copy the full SHA
    a7cf56b View commit details
  4. Improved test page performance for Chromium (#2020)

    This improves the performance of the test page for large chunks of text in Chromium-based browsers.
    RunDevelopment authored Aug 29, 2019
    Copy the full SHA
    3509f3e View commit details
  5. Core: Fixed greedy targeting bug (#1932)

    The `target` parameter defines the token which causes rematching. Rematching is done by recursively calling `matchGrammar` where `target` will be the current token name. The rematching is done if either a match was found or we reached the target token, whatever comes first.
    
    The bug is that a token is identified by its name. But the name alone doesn't uniquely identify a token in a grammar because many tokens can have the same name (array).
    
    This fixes this bug.
    RunDevelopment authored Aug 29, 2019
    Copy the full SHA
    e864d51 View commit details
  6. Core: Fixed greedy partial lookbehinds not working (#2030)

    This fixes the bug that greedy patterns with a lookbehind group did not support other top-level alternatives (e.g. `/foo|(lookbehind)bar/`) causing an error when used.
    RunDevelopment authored Aug 29, 2019
    Copy the full SHA
    174ed10 View commit details

Commits on Aug 31, 2019

  1. Core: Minor improvements (#1973)

    This makes some minor improvements to Prism Core like refactoring and style clean up.
    RunDevelopment authored Aug 31, 2019
    Copy the full SHA
    2d858e0 View commit details

Commits on Sep 2, 2019

  1. Turtle: Minor improvements (#2038)

    This makes a few minor improvements to Turtle:
    
    - Multiline strings were too greedy and matched `"""a"""""` whole.
    - URLs (IRI) were too accepting.
    - The keyword patterns are now disjoint.
    RunDevelopment authored Sep 2, 2019
    Copy the full SHA
    8ccd258 View commit details
  2. Added support for AQL (#2025)

    This adds support for the AQL language.
    
    https://www.arangodb.com/docs/stable/aql/
    RunDevelopment authored Sep 2, 2019
    Copy the full SHA
    3fdb7d5 View commit details
  3. Groovy: Minor improvements (#2036)

    This makes some minor improvements to the Groovy language definition.
    
    - Triple quoted strings now support backslash escapes
    - A single `.` will now be highlighted as `punctuation` instead of `operator` to be consistent with other languages.
    RunDevelopment authored Sep 2, 2019
    Copy the full SHA
    fb61833 View commit details
  4. Added support for Solidity (#2031)

    This adds support for the Solidity language.
    
    https://solidity.readthedocs.io/en/v0.4.23/
    RunDevelopment authored Sep 2, 2019
    Copy the full SHA
    cc2cf3f View commit details

Commits on Sep 3, 2019

  1. Use modern JavaScript in the NodeJS usage section (#1942)

    This updates the code examples in the NodeJS usage section to use modern JavaScript (ES6) features.
    RunDevelopment authored Sep 3, 2019
    Copy the full SHA
    5c68a55 View commit details
  2. Added test for nice names (#1911)

    This adds a test which requires every token name to match a strict pattern to avoid inconsistent naming styles.
    RunDevelopment authored Sep 3, 2019
    Copy the full SHA
    3fda5c9 View commit details
  3. Added Robot Framework plain text format (#2034)

    This adds support for the Robot Framework plain text space separated format.
    https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#plain-text-format
    RunDevelopment authored Sep 3, 2019
    Copy the full SHA
    f7eaa61 View commit details
  4. Doubly check the manual flag (#1957)

    This fixes the behavior of manual highlighting where it would highlight everything even with `manual: true`.
    This also adds doc as to how manual highlighting works.
    TimWolla authored and RunDevelopment committed Sep 3, 2019
    Copy the full SHA
    d49f0f2 View commit details
  5. Made the download button its own plugin (#1840)

    This makes the download button its own plugin instead of being part of File highlight.
    RunDevelopment authored Sep 3, 2019
    Copy the full SHA
    c6c62a6 View commit details
  6. Website: FAQ update (#1977)

    This removes the little script to show all tokens of a language and replaces it with a little UI to do the task on the Prism website.
    RunDevelopment authored Sep 3, 2019
    Copy the full SHA
    8a572af View commit details
  7. D: Fixed strings (#2029)

    * Fixed D strings
    
    * Rebuilt
    RunDevelopment authored Sep 3, 2019
    Copy the full SHA
    010a015 View commit details
  8. Added Inline color plugin (#2007)

    This adds a new plugin to display an inline preview of CSS colors as most IDEs do.
    RunDevelopment authored Sep 3, 2019
    Copy the full SHA
    8403e45 View commit details
  9. Website: Fixed the Toolbar plusing's overflow issue (#1966)

    This fixes the overflow issue of all Toolbar related plugins where some button were hidden behind the theme selection.
    RunDevelopment authored Sep 3, 2019
    Copy the full SHA
    56a8711 View commit details

Commits on Sep 4, 2019

  1. New Match Braces plugin (#1944)

    This adds a new plugin to highlight matching braces in highlighted code.
    RunDevelopment authored Sep 4, 2019
    Copy the full SHA
    365faad View commit details
  2. Smalltalk: Fixed single quote character literal (#2041)

    This fixes the incorrect tokenization of the character literals of single quotes which were recognized as string delimiters.
    bencoman authored and RunDevelopment committed Sep 4, 2019
    Copy the full SHA
    1aabcd1 View commit details

Commits on Sep 5, 2019

  1. Added support for SPARQL language (#2033)

    This adds support for the SPARQL language.
    https://www.w3.org/TR/sparql11-query/
    thomasdegroot18 authored and RunDevelopment committed Sep 5, 2019
    Copy the full SHA
    c42f877 View commit details
  2. Website: Use HTTPS link to alistapart.com (#2044)

    This changes the link to alistapart.com to use HTTPS.
    coliff authored and RunDevelopment committed Sep 5, 2019
    Copy the full SHA
    8bcc1b8 View commit details
  3. Readme: Links now use HTTPS if available (#2045)

    This changes some link of our README to use HTTPS wherever possible.
    coliff authored and RunDevelopment committed Sep 5, 2019
    Copy the full SHA
    6cd0738 View commit details

Commits on Sep 10, 2019

  1. Added .github folder to npm ignore (#2052)

    This adds the `.github` folder to `.npmignore` to exclude the directory from future releases.
    RunDevelopment authored Sep 10, 2019
    Copy the full SHA
    1af89e0 View commit details

Commits on Sep 12, 2019

  1. AQL: Added missing keyword + minor improvements (#2047)

    This adds 5 missing keywords, fixes the operator pattern to support the array concatenation operator properly, and makes the number pattern stricter.
    Simran-B authored and RunDevelopment committed Sep 12, 2019
    Copy the full SHA
    32a4c42 View commit details

Commits on Sep 16, 2019

  1. AQL: More pseudo keywords (#2055)

    This adds `COUNT`, `CURRENT`, `KEEP`, and `PRUNE` to the list of keywords such that false positives are (mostly) avoided.
    Simran-B authored and RunDevelopment committed Sep 16, 2019
    Copy the full SHA
    899574e View commit details

Commits on Sep 18, 2019

  1. AQL: Allow unclosed multi-line comments (#2058)

    AQL does not require multi-line comments to be closed. ArangoDB simply treats everything until the end of the query string as a comment in that case. This PR adjusts Prism to highlight such comments correctly.
    Simran-B authored and RunDevelopment committed Sep 18, 2019
    Copy the full SHA
    f3c6ba5 View commit details
  2. Tests: Simplified error message format (#2056)

    The error messages will now only contain the actual token stream the failed test and a full path of the test file plus the line and column number of the position of the first difference between the expected token stream and the actual token stream.
    Simran-B authored and RunDevelopment committed Sep 18, 2019
    Copy the full SHA
    007c9af View commit details

Commits on Sep 24, 2019

  1. Added support for syntax in Java 13 (#2060)

    This adds support for the new `yield` keyword and text blocks (triple quoted strings) which are both introduced in Java 13.
    RunDevelopment authored Sep 24, 2019
    Copy the full SHA
    a7b95dd View commit details

Commits on Sep 25, 2019

  1. Clojure: Added multiline strings (lisp style) (#2061)

    This adds support for linebreaks in Clojure strings.
    sooheon authored and RunDevelopment committed Sep 25, 2019
    Copy the full SHA
    8ea685b View commit details

Commits on Sep 26, 2019

  1. Issue template improvements (#2069)

    This fixes a typo in the issue templates and comments out some instruction to make them invisible in the issue.
    RunDevelopment authored Sep 26, 2019
    Copy the full SHA
    53f07b1 View commit details

Commits on Sep 30, 2019

  1. Added plugin descriptions to plugin list (#2076)

    This adds plugin descriptions to the plugin lists on the website.
    RunDevelopment authored Sep 30, 2019
    Copy the full SHA
    cdfa60a View commit details
  2. JS: Tokenize : as an operator (#2073)

    This changes the JS tokenization of `:` (colon) to `operator`.
    RunDevelopment authored Sep 30, 2019
    Copy the full SHA
    0e5c48d View commit details

Commits on Oct 5, 2019

  1. 1
    Copy the full SHA
    5d07aa7 View commit details

Commits on Oct 7, 2019

  1. SAS: Minor improvements (#2085)

    * Reorder comment array to fix edge case added to comment_feature.test
    * Adjust datalines to allow for possible preceding spaces before the closing semicolon
    * Move comment in SAS object for correct syntax matching precedence
    * Add several more keywords
    cedporter authored and RunDevelopment committed Oct 7, 2019
    Copy the full SHA
    07020c7 View commit details

Commits on Oct 13, 2019

  1. TypeScript: Added missing keyword undefined (#2088)

    This adds `undefined` to the list of keywords in TypeScript.
    Christian Ivicevic authored and RunDevelopment committed Oct 13, 2019
    Copy the full SHA
    c8b48b9 View commit details

Commits on Oct 15, 2019

  1. AQL: Disallow unclosed multiline comments again (#2089)

    This reverts commit f3c6ba5.
    Simran-B authored and RunDevelopment committed Oct 15, 2019
    Copy the full SHA
    717ace0 View commit details

Commits on Oct 16, 2019

  1. JavaScript: Added Optional Chaining and Nullish Coalescing (#2084)

    This adds support for optional chaining (`?.`) and nullish coalescing (`??`).
    RunDevelopment authored Oct 16, 2019
    Copy the full SHA
    fdb7de0 View commit details
  2. Added support for FTL (#2080)

    This adds support for FTL (Freemarker language).
    RunDevelopment authored Oct 16, 2019
    Copy the full SHA
    2f3da7e View commit details
  3. Minor improvements for C-like and Clojure (#2064)

    All changed patterns are equivalent with the exception of `c-like.class-name.pattern` where the `\b` before `catch` is new.
    RunDevelopment authored Oct 16, 2019
    Copy the full SHA
    7db0cab View commit details
Showing 1,362 changed files with 64,800 additions and 8,072 deletions.
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -9,11 +9,14 @@ assignees: ''

**Information:**
- Prism version: [e.g. 1.14, latest from the download page, etc.]
- Plugins: [a list of plugins you are using or 'none']
- Environment: [e.g. Browser, Node, Webpack]

<!--
Does the latest version of Prism from the [download page](https://prismjs.com/download.html) also have this issue?
If you're using Prism with Node or Webpack, please also see the [usage section](https://prismjs.com/index.html#basic-usage).
-->

**Description**
A clear and concise description of what the bug is and how to reproduce it.
11 changes: 10 additions & 1 deletion .github/ISSUE_TEMPLATE/highlighting-bug-report.md
Original file line number Diff line number Diff line change
@@ -12,13 +12,22 @@ assignees: ''
- Language: [e.g. C++, JavaScript, YAML, etc.]
- Plugins: [a list of plugins you are using or 'none']

Does the problem still occur in the latest version of Prism? You can check using the [test page](https://prismjs.com/test.html) or get the latest version at the [download page](https://prismjs.com/download.html).
<!--
Please verify that the problem still occurs in the latest version of Prism.
You can check this using the [test page](https://prismjs.com/test.html) or by getting the latest version at our [download page](https://prismjs.com/download.html).
-->

**Description**
A clear and concise description of what is being highlighted incorrectly and how it should be highlighted instead. Add screenshots to illustrate the problem.

**Code snippet**

<!--
Please add a link to the [test page](https://prismjs.com/test.html) that reproduces your issue (hover over "Share" and insert the link below).
-->
[Test page]()

<details>
<summary>The code being highlighted incorrectly.</summary>

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/new-language-request.md
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
name: New language request
about: Suggest a new language Prism should support.
title: ''
labels: language-definitions, new langauge
labels: language-definitions, new language
assignees: ''

---
24 changes: 24 additions & 0 deletions .github/workflows/danger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Danger

on:
pull_request_target:

jobs:
run:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0
# create a new branch called pr from the remote PR branch
- run: git remote add pr_repo $PR_URL && git fetch pr_repo $PR_REF && git branch pr pr_repo/$PR_REF
env:
PR_URL: ${{github.event.pull_request.head.repo.clone_url}}
PR_REF: ${{github.event.pull_request.head.ref}}
- run: npm ci
- name: Danger
run: npx danger ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46 changes: 46 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
tests:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test

build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build
- run: |
git add --all && \
git diff-index --cached HEAD --stat --exit-code || \
(echo && echo "The above files changed because the build is not up to date." && echo "Please rebuild Prism." && exit 1)
66 changes: 66 additions & 0 deletions .jsdoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"plugins": [
"plugins/markdown",
"./gulpfile.js/docs.js"
],
"opts": {
"destination": "./docs",
"encoding": "utf8",
"template": "./node_modules/docdash",
"access": [
"public",
"protected"
]
},
"recurseDepth": 10,
"source": {
"includePattern": "\\.js$",
"excludePattern": "\\.min\\.js$"
},
"tags": {
"allowUnknownTags": true,
"dictionaries": [
"jsdoc",
"closure"
]
},
"templates": {
"cleverLinks": true,
"monospaceLinks": true,
"default": {
"includeDate": false
}
},
"docdash": {
"static": true,
"sort": true,
"search": true,
"collapse": false,
"wrap": false,
"typedefs": true,
"private": false,
"scripts": [
"styles/overwrites.css"
],
"openGraph": {
"title": "Prism generated API documentation",
"type": "website",
"image": "/logo.svg",
"site_name": "Prism",
"url": "https://prismjs.com"
},
"menu": {
"PrismJS": {
"href": "https://prismjs.com",
"class": "menu-item",
"id": "website_link"
},
"GitHub": {
"href": "https://github.com/PrismJS/prism",
"target": "_blank",
"class": "menu-item",
"id": "github_link"
}
}
}
}
11 changes: 5 additions & 6 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -4,18 +4,17 @@
hide-*.js
.DS_Store
CNAME
.github/
assets/
docs/
examples/
img/
templates/
tests/
scripts/
*.tgz
*.html
style.css
favicon.png
logo.svg
*.svg
bower.json
composer.json
dangerfile.js
gulpfile.js
.editorconfig
.gitattributes
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

Loading