Skip to content

Commit

Permalink
Merge branch 'release/2.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed May 28, 2021
2 parents c766a6d + 4b5e255 commit 38077a0
Show file tree
Hide file tree
Showing 45 changed files with 6,246 additions and 45 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# v2.0.1
## 05/28/2021

1. [](#new)
* Added support for `cl-filter-output` and provided examples in the README.md
* Added 35 new themes
* Added support for custom `EcScript`

# v2.0.0
## 02/23/2021

Expand Down
119 changes: 91 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,41 @@ For example:

For a command Prompt:

If you don't provide a custom prompt, it will default to `$` for the command prompt. Provide a custom prompt with the `cl-prompt` attribute.

```
[prism classes="language-bash command-line" cl-prompt="\[foo@localhost\] $"]
cd ~/webroot
git clone -b master https://github.com/getgrav/grav.git
[/prism]
```

You can also specify certain lines as output (won't be prefixed by prompt) using the `cl-output` attribute:

```
[prism classes="language-bash command-line" cl-prompt="[root@localhost]" cl-output="2-6"]
ls -la
total 2
drwxr-xr-x 2 chris chris 11 Jan 10 16:48 .
drwxr--r-x 45 chris chris 92 Feb 14 11:10 ..
-rwxr-xr-x 1 chris chris 444 Aug 25 2013 backup
-rwxr-xr-x 1 chris chris 642 Jan 17 14:42 deploy
[/prism]
```

Alternatively you can use the `cl-filter-putput` to provide a lines with a specific prefix to filter out. For example:

```
[prism classes="language-bash command-line" cl-prompt="[root@localhost]" cl-filter-output=">>"]
ls -la
>>total 2
>>drwxr-xr-x 2 chris chris 11 Jan 10 16:48 .
>>drwxr--r-x 45 chris chris 92 Feb 14 11:10 ..
>>-rwxr-xr-x 1 chris chris 444 Aug 25 2013 backup
>>-rwxr-xr-x 1 chris chris 642 Jan 17 14:42 deploy
[/prism]
```

For highlighting specific lines 2 and 4:

```
Expand Down Expand Up @@ -223,6 +251,7 @@ base16-duotone-darksea.dark.css
base16-duotone-darksea.light.css
base16-duotone-darkspace.dark.css
base16-duotone-darkspace.light.css
prism-a11y-dark.css
prism-atelier-cave-dark.css
prism-atelier-cave-light.css
prism-atelier-dune-dark.css
Expand All @@ -244,34 +273,6 @@ prism-atelier-seaside-light.css
prism-atelier-sulphurpool-dark.css
prism-atelier-sulphurpool-light.css
prism-atom-dark.css
prism-base2tone-cave-dark.css
prism-base2tone-cave-light.css
prism-base2tone-desert-dark.css
prism-base2tone-desert-light.css
prism-base2tone-drawbridge-dark.css
prism-base2tone-drawbridge-light.css
prism-base2tone-earth-dark.css
prism-base2tone-earth-light.css
prism-base2tone-evening-dark.css
prism-base2tone-evening-light.css
prism-base2tone-forest-dark.css
prism-base2tone-forest-light.css
prism-base2tone-heath-dark.css
prism-base2tone-heath-light.css
prism-base2tone-lake-dark.css
prism-base2tone-lake-light.css
prism-base2tone-meadow-dark.css
prism-base2tone-meadow-light.css
prism-base2tone-morning-dark.css
prism-base2tone-morning-light.css
prism-base2tone-pool-dark.css
prism-base2tone-pool-light.css
prism-base2tone-sea-dark.css
prism-base2tone-sea-light.css
prism-base2tone-space-dark.css
prism-base2tone-space-light.css
prism-base2tone-suburb-dark.css
prism-base2tone-suburb-light.css
prism-base16-3024.dark.css
prism-base16-3024.light.css
prism-base16-apathy.dark.css
Expand Down Expand Up @@ -358,6 +359,68 @@ prism-base16-tomorrow.dark.css
prism-base16-tomorrow.light.css
prism-base16-twilight.dark.css
prism-base16-twilight.light.css
prism-base2tone-cave-dark.css
prism-base2tone-cave-light.css
prism-base2tone-desert-dark.css
prism-base2tone-desert-light.css
prism-base2tone-drawbridge-dark.css
prism-base2tone-drawbridge-light.css
prism-base2tone-earth-dark.css
prism-base2tone-earth-light.css
prism-base2tone-evening-dark.css
prism-base2tone-evening-light.css
prism-base2tone-forest-dark.css
prism-base2tone-forest-light.css
prism-base2tone-heath-dark.css
prism-base2tone-heath-light.css
prism-base2tone-lake-dark.css
prism-base2tone-lake-light.css
prism-base2tone-meadow-dark.css
prism-base2tone-meadow-light.css
prism-base2tone-morning-dark.css
prism-base2tone-morning-light.css
prism-base2tone-pool-dark.css
prism-base2tone-pool-light.css
prism-base2tone-sea-dark.css
prism-base2tone-sea-light.css
prism-base2tone-space-dark.css
prism-base2tone-space-light.css
prism-base2tone-suburb-dark.css
prism-base2tone-suburb-light.css
prism-cb.css
prism-coldark-cold.css
prism-coldark-dark.css
prism-coy-without-shadows.css
prism-coy.css
prism-darcula.css
prism-dark.css
prism-dracula.css
prism-duotone-dark.css
prism-duotone-earth.css
prism-duotone-forest.css
prism-duotone-light.css
prism-duotone-sea.css
prism-duotone-space.css
prism-funky.css
prism-ghcolors.css
prism-gruvbox-dark.css
prism-hopscotch.css
prism-lucario.css
prism-material-dark.css
prism-material-light.css
prism-material-oceanic.css
prism-night-owl.css
prism-nord.css
prism-okaidia.css
prism-pojoaque.css
prism-shades-of-purple.css
prism-solarizedlight.css
prism-synthwave84.css
prism-tomorrow.css
prism-twilight.css
prism-vs.css
prism-vsc-dark-plus.css
prism-xonokai.css
```

Check out a [live test](http://prismjs.com/test.html) or a [live demo](http://prismjs.com/index.html#examples).
Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Prism Highlighter
version: 2.0.0
version: 2.0.1
description: "This plugin provides code highlighting functionality via the [Prism.js](http://prismjs.com/) syntax highlighter with lots of themes and plugins."
icon: code
author:
Expand Down
2 changes: 1 addition & 1 deletion css/prism.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* PrismJS 1.23.0
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+apacheconf+bash+coffeescript+css-extras+diff+docker+git+go+java+json+json5+less+lua+markdown+markup-templating+php+php-extras+python+regex+ruby+sass+scss+sql+twig+yaml&plugins=line-highlight+line-numbers+command-line+toolbar+copy-to-clipboard */
http://localhost:8080/download.html#themes=prism&languages=ecscript+markup+css+clike+javascript+apacheconf+bash+coffeescript+css-extras+diff+docker+git+go+java+json+json5+less+lua+markdown+markup-templating+php+php-extras+python+regex+ruby+sass+scss+sql+twig+yaml&plugins=line-highlight+line-numbers+command-line+toolbar+copy-to-clipboard */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
Expand Down
161 changes: 161 additions & 0 deletions css/themes/prism-a11y-dark.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
/**
* a11y-dark theme for JavaScript, CSS, and HTML
* Based on the okaidia theme: https://github.com/PrismJS/prism/blob/gh-pages/themes/prism-okaidia.css
* @author ericwbailey
*/

code[class*="language-"],
pre[class*="language-"] {
color: #f8f8f2;
background: none;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;

-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;

-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}

/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: 0.5em 0;
overflow: auto;
border-radius: 0.3em;
}

:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background: #2b2b2b;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
padding: 0.1em;
border-radius: 0.3em;
white-space: normal;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: #d4d0ab;
}

.token.punctuation {
color: #fefefe;
}

.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
color: #ffa07a;
}

.token.boolean,
.token.number {
color: #00e0e0;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #abe338;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
color: #00e0e0;
}

.token.atrule,
.token.attr-value,
.token.function {
color: #ffd700;
}

.token.keyword {
color: #00e0e0;
}

.token.regex,
.token.important {
color: #ffd700;
}

.token.important,
.token.bold {
font-weight: bold;
}

.token.italic {
font-style: italic;
}

.token.entity {
cursor: help;
}

@media screen and (-ms-high-contrast: active) {
code[class*="language-"],
pre[class*="language-"] {
color: windowText;
background: window;
}

:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background: window;
}

.token.important {
background: highlight;
color: window;
font-weight: normal;
}

.token.atrule,
.token.attr-value,
.token.function,
.token.keyword,
.token.operator,
.token.selector {
font-weight: bold;
}

.token.attr-value,
.token.comment,
.token.doctype,
.token.function,
.token.keyword,
.token.operator,
.token.property,
.token.string {
color: highlight;
}

.token.attr-value,
.token.url {
font-weight: normal;
}
}
Loading

0 comments on commit 38077a0

Please sign in to comment.