Skip to content

Commit

Permalink
Highlight.js v8.5 -> Enlight v1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Qeole committed Apr 7, 2015
1 parent 7653d92 commit 7e4c324
Show file tree
Hide file tree
Showing 62 changed files with 875 additions and 365 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Firefox add-on providing syntax highlighting for raw code, based on the highlight.js project.

Syntax highlighting relies on highlight.js project (see [project homepage][1]. Currently packaged with the add-on is the version 8.4 of highlight.js, which provides 49 color themes and syntax for 22 languages.
Syntax highlighting relies on highlight.js project (see [project homepage][1]. Currently packaged with the add-on is the version 8.5 of highlight.js, which provides 54 color themes and syntax for 22 languages.

## Install

Expand All @@ -26,7 +26,7 @@ You can also select the color theme you want to use in the add-on preferences, t

## Supporting more languages

The highlight.js minimal script included in this module provides support for 22 languages, while the project theoretically offers support for up to 112 languages. I had to restrict it because of Mozilla add-on platform review policy. To get support for more languages, you can use one of the two following methods:
The highlight.js minimal script included in this module provides support for 22 languages, while the project theoretically offers support for up to 118 languages. I had to restrict it because of Mozilla add-on platform review policy. To get support for more languages, you can use one of the two following methods:
* Use branch `all_languages` of this repository − it contains a binary `xpi` file not approved by Mozilla, but containing support for all languages. NOTE: `all_languages` branch was not verified by Mozilla, so you are _not_ expected to do this unless you trust me for not altering code from highlight.js, or you verified by yourself.
* Add support yourself by reproducing following steps:
1. download an archive containing all languages you want from https://highlightjs.org/download;
Expand Down
42 changes: 42 additions & 0 deletions data/highlightjs/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
## Version 8.5

New languages:

- *pf.conf* by [Peter Piwowarski][]
- *Julia* by [Kenta Sato][]
- *Prolog* by [Raivo Laanemets][]
- *Docker* by [Alexis Hénaut][]
- *Fortran* by [Anthony Scemama][] and [Thomas Applencourt][]
- *Kotlin* by [Sergey Mashkov][]

New Styles:

- *Agate* by [Taufik Nurrohman][]
- *Darkula* by [Jet Brains][]
- *Atelier Sulpherpool* by [Bram de Haan][]
- *Android Studio* by [Pedro Oliveira][]

Notable fixes and improvements to existing languages:

- ES6 features in JavaScript are better supported now by [Gu Yiling][].
- Swift now recognizes body-less method definitions.
- Single expression functions `def foo, do: ... ` now work in Elixir.
- More uniform detection of built-in classes in Objective C.
- Fixes for number literals and processor directives in Rust.
- HTML `<script>` tag now allows any language, not just JavaScript.
- Multi-line comments are supported now in MatLab.

[Taufik Nurrohman]: https://github.com/tovic
[Jet Brains]: https://www.jetbrains.com/
[Peter Piwowarski]: https://github.com/oldlaptop
[Kenta Sato]: https://github.com/bicycle1885
[Bram de Haan]: https://github.com/atelierbram
[Raivo Laanemets]: https://github.com/rla
[Alexis Hénaut]: https://github.com/AlexisNo
[Anthony Scemama]: https://github.com/scemama
[Pedro Oliveira]: https://github.com/kanytu
[Gu Yiling]: https://github.com/Justineo
[Sergey Mashkov]: https://github.com/cy6erGn0m
[Thomas Applencourt]: https://github.com/TApplencourt

## Version 8.4

We've got the new [demo page][]! The obvious new feature is the new look, but
Expand Down Expand Up @@ -91,6 +132,7 @@ New languages in this release:
[Lucas Mazza]: https://github.com/lucasmazza
[Vincent Zurczak]: https://github.com/vincent-zurczak


## Version 8.2

We've finally got [real tests][test] and [continuous testing on Travis][ci]
Expand Down
14 changes: 7 additions & 7 deletions data/highlightjs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Highlight.js is a syntax highlighter written in JavaScript. It works in the
browser as well as on the server. It works with pretty much any markup,
doesn't depend on any framework and has automatic language detection.
doesnt depend on any framework and has automatic language detection.


## Getting Started
Expand All @@ -18,9 +18,9 @@ along with one of the styles and calling [`initHighlightingOnLoad`][1]:
<script>hljs.initHighlightingOnLoad();</script>
```

This will find and highlight code inside of `<pre><code>` tags trying to detect
the language automatically. If automatic detection doesn't work for you, you can
specify the language in the class attribute:
This will find and highlight code inside of `<pre><code>` tags; it tries to detect
the language automatically. If automatic detection doesnt work for you, you can
specify the language in the `class` attribute:

```html
<pre><code class="html">...</code></pre>
Expand All @@ -41,7 +41,7 @@ When you need a bit more control over the initialization of
highlight.js, you can use the [`highlightBlock`][2] and [`configure`][3]
functions. This allows you to control *what* to highlight and *when*.

Here's an equivalent way to calling [`initHighlightingOnLoad`][1] using jQuery:
Heres an equivalent way to calling [`initHighlightingOnLoad`][1] using jQuery:

```javascript
$(document).ready(function() {
Expand Down Expand Up @@ -71,8 +71,8 @@ For other options refer to the documentation for [`configure`][3].
You can get highlight.js as a hosted or custom-build browser script or as a
server module. Head over to the [download page][4] for all the options.

Note, that the library is not supposed to work straight from the source on
GitHub, it requires building. If none of the pre-packaged options work for you
**Note:** the library is not supposed to work straight from the source on
GitHub; it requires building. If none of the pre-packaged options work for you
refer to the [building documentation][5].


Expand Down
4 changes: 2 additions & 2 deletions data/highlightjs/highlight.min.js

Large diffs are not rendered by default.

138 changes: 138 additions & 0 deletions data/highlightjs/styles/agate.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
/*!
* Agate by Taufik Nurrohman <https://github.com/tovic>
* ----------------------------------------------------
*
* #ade5fc
* #a2fca2
* #c6b4f0
* #d36363
* #fcc28c
* #fc9b9b
* #ffa
* #fff
* #333
* #62c8f3
* #888
*
*/

.hljs {
display: block;
overflow-x: auto;
padding: .5em;
background: #333;
color: white;
-webkit-text-size-adjust: none;
}

.asciidoc .hljs-title,
.hljs-label,
.hljs-tag .hljs-title,
.hljs-prompt,
.http .hljs-request {
font-weight: bold;
}

.hljs-change,
.hljs-code {
font-style: italic;
}

.hljs-tag,
.ini .hljs-title {
color: #62c8f3;
}

.hljs-id,
.hljs-cbracket,
.hljs-tag .hljs-value {
color: #ade5fc;
}

.hljs-string,
.hljs-bullet {
color: #a2fca2;
}

.hljs-type,
.hljs-variable,
.hljs-name,
.actionscript .hljs-title,
.aspectj .hljs-annotation,
.aspectj .hljs-title,
.hljs-attribute,
.hljs-change,
.hljs-blockquote,
.hljs-built_in {
color: #ffa;
}

.hljs-number,
.hljs-hexcolor,
.hljs-link_label,
.hljs-link_reference {
color: #d36363;
}

.hljs-keyword,
.hljs-literal,
.hljs-constant,
.css .hljs-tag,
.hljs-typename,
.hljs-winutils {
color: #fcc28c;
}

.hljs-comment,
.hljs-cdata,
.hljs-preprocessor,
.hljs-annotation,
.hljs-decorator,
.hljs-doctype,
.hljs-deletion,
.hljs-shebang,
.apache .hljs-sqbracket,
.tex .hljs-formula,
.hljs-header,
.hljs-horizontal_rule,
.hljs-code,
.hljs-javadoc {
color: #888;
}

.hljs-regexp,
.hljs-attr_selector {
color: #c6b4f0;
}

.hljs-important,
.hljs-doctype,
.hljs-pi,
.hljs-chunk,
.actionscript .hljs-type,
.hljs-shebang,
.hljs-pragma,
.http .hljs-attribute {
color: #fc9b9b;
}

.hljs-deletion {
background-color: #fc9b9b;
color: #333;
}

.hljs-addition {
background-color: #a2fca2;
color: #333;
}

.hljs a,
.hljs-tag .hljs-attribute {
color: inherit;
}

.hljs a:focus,
.hljs a:hover {
color: inherit;
text-decoration: underline;
}
55 changes: 55 additions & 0 deletions data/highlightjs/styles/androidstudio.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
Date: 24 Fev 2015
Author: Pedro Oliveira <kanytu@gmail . com>
*/

.hljs
{
color: #A9B7C6;
background: #282b2e;
display: block;
overflow-x: auto;
padding: 0.5em;
webkit-text-size-adjust: none;
}
.hljs-number
{
color: #6897BB;
}

.hljs-keyword, .hljs-deletion
{
color: #CC7832;
}
.hljs-javadoc
{
color: #629755;
}
.hljs-comment
{
color: #808080;
}
.hljs-annotation
{
color: #BBB529;
}
.hljs-string, .hljs-addition
{
color: #6A8759;
}
.hljs-function .hljs-title, .hljs-change
{
color: #FFC66D;
}
.hljs-tag .hljs-title, .hljs-doctype
{
color: #E8BF6A;
}
.hljs-tag .hljs-attribute
{
color: #BABABA;
}
.hljs-tag .hljs-value
{
color: #A5C261;
}
3 changes: 2 additions & 1 deletion data/highlightjs/styles/arta.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Author: pumbur <[email protected]>
.hljs-pi,
.hljs-doctype,
.hljs-tag,
.css .hljs-rules,
.css .hljs-rule,
.tex .hljs-special {
color: #444;
}
Expand Down Expand Up @@ -68,6 +68,7 @@ Author: pumbur <[email protected]>
.hljs-important,
.hljs-flow,
.hljs-inheritance,
.hljs-name,
.parser3 .hljs-variable {
color: #32aaee;
}
Expand Down
3 changes: 2 additions & 1 deletion data/highlightjs/styles/ascetic.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
Original style from softwaremaniacs.org (c) Ivan Sagalaev <[email protected]>
Expand All @@ -18,6 +18,7 @@ Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiac
.hljs-filter .hljs-argument,
.hljs-addition,
.hljs-change,
.hljs-name,
.apache .hljs-tag,
.apache .hljs-cbracket,
.nginx .hljs-built_in,
Expand Down
Loading

0 comments on commit 7e4c324

Please sign in to comment.