[Pkg-javascript-commits] [highlight.js] 01/06: Imported Upstream version 8.1+ds

Cédric Boutillier boutil at moszumanska.debian.org
Sat Jul 26 19:25:05 UTC 2014


This is an automated email from the git hooks/post-receive script.

boutil pushed a commit to branch master
in repository highlight.js.

commit 166a81b17e0c6a4d4154bdebbbb338f42bdb576f
Author: Cédric Boutillier <boutil at debian.org>
Date:   Thu Jul 24 14:07:23 2014 +0200

    Imported Upstream version 8.1+ds
---
 .gitignore                                         |   1 +
 AUTHORS.en.txt                                     |  22 +-
 AUTHORS.ru.txt                                     |  24 +-
 CHANGES.md                                         |  95 ++-
 README.md                                          | 180 ++--
 README.ru.md                                       | 184 ++---
 docs/api.rst                                       |   9 +-
 docs/building-testing.rst                          |   4 +-
 docs/conf.py                                       |   4 +-
 docs/css-classes-reference.rst                     | 381 +++++++--
 docs/index.rst                                     |   9 +-
 ...{contribution.rst => language-contribution.rst} |  14 +-
 docs/reference.rst                                 |  13 +-
 docs/style-contribution.rst                        |  41 +
 docs/style-guide.rst                               |   6 +
 src/export.html                                    |  87 --
 src/highlight.js                                   |  76 +-
 src/languages/actionscript.js                      |   5 +-
 src/languages/apache.js                            |   1 +
 src/languages/applescript.js                       |   5 +-
 src/languages/avrasm.js                            |  10 +-
 src/languages/axapta.js                            |   2 +-
 src/languages/bash.js                              |   1 +
 src/languages/brainfuck.js                         |   1 +
 src/languages/capnproto.js                         |  54 ++
 src/languages/clojure.js                           |   1 +
 src/languages/cmake.js                             |   1 +
 src/languages/coffeescript.js                      |   3 +-
 src/languages/cpp.js                               |  13 +-
 src/languages/cs.js                                |  18 +-
 src/languages/css.js                               |  10 +-
 src/languages/d.js                                 | 440 +++++-----
 src/languages/diff.js                              |   1 +
 src/languages/django.js                            |   1 +
 src/languages/dos.js                               |   1 +
 src/languages/elixir.js                            | 114 +++
 src/languages/erlang.js                            |  11 +-
 src/languages/fsharp.js                            |   6 +-
 src/languages/gherkin.js                           |  35 +
 src/languages/gradle.js                            |  40 +
 src/languages/haml.js                              |   2 +-
 src/languages/handlebars.js                        |   1 +
 src/languages/haskell.js                           |   1 +
 src/languages/{actionscript.js => haxe.js}         |  36 +-
 src/languages/java.js                              |   5 +-
 src/languages/javascript.js                        |   5 +-
 src/languages/lasso.js                             |  23 +-
 src/languages/lisp.js                              |  11 +-
 src/languages/livecodeserver.js                    |   4 +-
 src/languages/lua.js                               |   2 +-
 src/languages/makefile.js                          |   5 +-
 src/languages/markdown.js                          |   3 +-
 src/languages/matlab.js                            |   9 +-
 src/languages/monkey.js                            |  83 ++
 src/languages/nginx.js                             |   7 +-
 src/languages/nimrod.js                            |  58 ++
 src/languages/nix.js                               |  56 ++
 src/languages/nsis.js                              |  92 +++
 src/languages/objectivec.js                        |  52 +-
 src/languages/ocaml.js                             |   5 +-
 src/languages/oxygene.js                           |  12 +-
 src/languages/perl.js                              |   7 +-
 src/languages/php.js                               |   7 +-
 src/languages/protobuf.js                          |  42 +
 src/languages/python.js                            |   9 +-
 src/languages/ruby.js                              |  71 +-
 src/languages/rust.js                              |  49 +-
 src/languages/scala.js                             |  12 +-
 src/languages/scilab.js                            |   5 +-
 src/languages/scss.js                              |  26 +-
 src/languages/smalltalk.js                         |   1 +
 src/languages/sql.js                               | 105 ++-
 src/languages/swift.js                             | 111 +++
 src/languages/thrift.js                            |  41 +
 src/languages/{javascript.js => typescript.js}     |  34 +-
 src/languages/vala.js                              |   2 +-
 src/languages/vbnet.js                             |   5 +-
 src/languages/vbscript.js                          |   1 +
 src/languages/vim.js                               |  68 ++
 src/languages/x86asm.js                            | 152 ++++
 src/languages/xml.js                               |   2 +-
 src/package.json                                   |   2 +-
 src/styles/arta.css                                |  49 +-
 src/styles/ascetic.css                             |   9 +-
 src/styles/atelier-dune.dark.css                   |   3 +-
 src/styles/atelier-dune.light.css                  |   3 +-
 src/styles/atelier-forest.dark.css                 |   3 +-
 src/styles/atelier-forest.light.css                |   3 +-
 src/styles/atelier-heath.dark.css                  |   3 +-
 src/styles/atelier-heath.light.css                 |   3 +-
 src/styles/atelier-lakeside.dark.css               |   3 +-
 src/styles/atelier-lakeside.light.css              |   3 +-
 src/styles/atelier-seaside.dark.css                |   3 +-
 src/styles/atelier-seaside.light.css               |   3 +-
 src/styles/brown_paper.css                         |  10 +-
 src/styles/codepen-embed.css                       | 107 +++
 src/styles/{default.css => color-brewer.css}       |  38 +-
 src/styles/dark.css                                |  10 +-
 src/styles/default.css                             |  11 +-
 src/styles/docco.css                               |  40 +-
 src/styles/far.css                                 |  19 +-
 src/styles/foundation.css                          |   4 +-
 src/styles/github.css                              |  38 +-
 src/styles/googlecode.css                          |  25 +-
 src/styles/hybrid.css                              | 169 ++++
 src/styles/idea.css                                |   7 +-
 src/styles/ir_black.css                            |  31 +-
 src/styles/{paraiso.light.css => kimbie.dark.css}  |  44 +-
 src/styles/{paraiso.light.css => kimbie.light.css} |  44 +-
 src/styles/magula.css                              |   7 +-
 src/styles/mono-blue.css                           |  11 +-
 src/styles/monokai.css                             |  18 +-
 src/styles/monokai_sublime.css                     |   4 +-
 src/styles/obsidian.css                            |  42 +-
 src/styles/paraiso.dark.css                        |   1 +
 src/styles/paraiso.light.css                       |   1 +
 src/styles/pojoaque.css                            |  12 +-
 src/styles/railscasts.css                          |  51 +-
 src/styles/rainbow.css                             |  15 +-
 src/styles/school_book.css                         |  12 +-
 src/styles/solarized_dark.css                      |   1 +
 src/styles/solarized_light.css                     |   1 +
 src/styles/sunburst.css                            |  57 +-
 src/styles/tomorrow-night-blue.css                 |   1 +
 src/styles/tomorrow-night-bright.css               |   1 +
 src/styles/tomorrow-night-eighties.css             |   1 +
 src/styles/tomorrow-night.css                      |   1 +
 src/styles/tomorrow.css                            |   1 +
 src/styles/vs.css                                  |  13 +-
 src/styles/xcode.css                               |  25 +-
 src/styles/zenburn.css                             |  29 +-
 src/test.html                                      | 908 ++++++++++++++++++---
 tools/build.py                                     |  49 +-
 133 files changed, 3725 insertions(+), 1370 deletions(-)

diff --git a/.gitignore b/.gitignore
index 4792b97..8301361 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 .DS_Store
 build
 docs/_build
+.idea/
 __pycache__
 *.swp
diff --git a/AUTHORS.en.txt b/AUTHORS.en.txt
index fb50ac3..7a98a0a 100644
--- a/AUTHORS.en.txt
+++ b/AUTHORS.en.txt
@@ -94,7 +94,27 @@ Contributors:
 - Bram de Haan <info at atelierbramdehaan.nl>
 - Seongwon Lee <dlimpid at gmail.com>
 - Zaven Muradyan <megalivoithos at gmail.com>
-- Jan T. Sott <jan at idleberg.com>
+- Jan T. Sott <git at idleberg.com>
 - Brent Bradbury <brent at brentium.com>
 - Martin Dilling-Hansen <martindlling at gmail.com>
 - Ilya Vassilevsky <vassilevsky at gmail.com>
+- Josh Adams <josh at isotope11.com>
+- Dan Tao <daniel.tao at gmail.com>
+- Jeff Escalante <hello at jenius.me>
+- Jun Yang <yangjvn at 126.com>
+- Nikolay Lisienko <info at neor.ru>
+- Heiko August <post at auge8472.de>
+- Domen Kožar <domen at dev.si>
+- Travis Odom <travis.a.odom at gmail.com>
+- innocenat <innocenat at gmail.com>
+- Arthur Bikmullin <devolonter at gmail.com>
+- Pascal Hurni <phi at ruby-reactive.org>
+- Roman Shmatov <romanshmatov at gmail.com>
+- Nic West <nic at letolab.com>
+- Panu Horsmalahti <panu.horsmalahti at iki.fi>
+- Flaviu Tamas <tamas.flaviu at gmail.com>
+- Damian Mee <mee.damian at gmail.com>
+- Christopher Kaster <ikasoki at gmail.com>
+- Chris Eidhof <chris at eidhof.nl>
+- Nate Cook <natecook at gmail.com>
+- Matt Diephouse <matt at diephouse.com>
diff --git a/AUTHORS.ru.txt b/AUTHORS.ru.txt
index 0292b1f..b3a7bae 100644
--- a/AUTHORS.ru.txt
+++ b/AUTHORS.ru.txt
@@ -94,5 +94,27 @@ URL:   http://highlightjs.org/
 - Брэм де Хаан <info at atelierbramdehaan.nl>
 - Сенгвон Ли <dlimpid at gmail.com>
 - Завен Мурадян <megalivoithos at gmail.com>
-- Ян Т. Сотт <jan at idleberg.com>
+- Ян Т. Сотт <git at idleberg.com>
 - Брент Брэдбери <brent at brentium.com>
+- Мартин Дилинг-Хэнсен <martindlling at gmail.com>
+- Илья Вассилевский <vassilevsky at gmail.com>
+- Джош Адамс <josh at isotope11.com>
+- Дан Тао <daniel.tao at gmail.com>
+- Джеф Эскаланте <hello at jenius.me>
+- Джун Янг <yangjvn at 126.com>
+- Николай Лисиенко <info at neor.ru>
+- Хейко Август <post at auge8472.de>
+- Домен Кожар <domen at dev.si>
+- Трэвис Одом <travis.a.odom at gmail.com>
+- innocenat <innocenat at gmail.com>
+- Артур Бикмуллин <devolonter at gmail.com>
+- Паскаль Хурни <phi at ruby-reactive.org>
+- Роман Шматов <romanshmatov at gmail.com>
+- Ник Вест <nic at letolab.com>
+- Пану Хорсмалахти <panu.horsmalahti at iki.fi>
+- Флавиу Тамас <tamas.flaviu at gmail.com>
+- Дамьен Ми <mee.damian at gmail.com>
+- Кристофер Кастер <ikasoki at gmail.com>
+- Крис Еидхоф <chris at eidhof.nl>
+- Нейт Кук <natecook at gmail.com>
+- Мэтт Дайпхауз <matt at diephouse.com>
diff --git a/CHANGES.md b/CHANGES.md
index f878062..0cc10f6 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,4 +1,82 @@
-## Version 8.0 beta
+## Version 8.1
+
+New languages:
+
+- *Gherkin* by [Sam Pikesley][]
+- *Elixir* by [Josh Adams][]
+- *NSIS* by [Jan T. Sott][]
+- *VIM script* by [Jun Yang][]
+- *Protocol Buffers* by [Dan Tao][]
+- *Nix* by [Domen Kožar][]
+- *x86asm* by [innocenat][]
+- *Cap’n Proto* and *Thrift* by [Oleg Efimov][]
+- *Monkey* by [Arthur Bikmullin][]
+- *TypeScript* by [Panu Horsmalahti][]
+- *Nimrod* by [Flaviu Tamas][]
+- *Gradle* by [Damian Mee][]
+- *Haxe* by [Christopher Kaster][]
+- *Swift* by [Chris Eidhof][] and [Nate Cook][]
+
+New styles:
+
+- *Kimbie*, light and dark variants by [Jan T. Sott][]
+- *Color brewer* by [Fabrício Tavares de Oliveira][]
+- *Codepen.io embed* by [Justin Perry][]
+- *Hybrid* by [Nic West][]
+
+[Sam Pikesley]: https://github.com/pikesley
+[Josh Adams]: https://github.com/knewter
+[Jan T. Sott]: https://github.com/idleberg
+[Jun Yang]: https://github.com/harttle
+[Dan Tao]: https://github.com/dtao
+[Domen Kožar]: https://github.com/iElectric
+[innocenat]: https://github.com/innocenat
+[Oleg Efimov]: https://github.com/Sannis
+[Arthur Bikmullin]: https://github.com/devolonter
+[Panu Horsmalahti]: https://github.com/panuhorsmalahti
+[Flaviu Tamas]: https://github.com/flaviut
+[Damian Mee]: https://github.com/chester1000
+[Christopher Kaster]: http://christopher.kaster.ws
+[Fabrício Tavares de Oliveira]: https://github.com/fabriciotav
+[Justin Perry]: https://github.com/ourmaninamsterdam
+[Nic West]: https://github.com/nicwest
+[Chris Eidhof]: https://github.com/chriseidhof
+[Nate Cook]: https://github.com/natecook1000
+
+Other improvements:
+
+- The README is heavily reworked and brought up to date by [Jeremy Hull][].
+- Added [`listLanguages()`][ll] method in the API.
+- Improved C/C++/C# detection.
+- Added a bunch of new language aliases, documented the existing ones. Thanks to
+  [Sindre Sorhus][] for background research.
+- Added phrasal English words to boost relevance in comments.
+- Many improvements to SQL definition made by [Heiko August][],
+  [Nikolay Lisienko][] and [Travis Odom][].
+- The shorter `lang-` prefix for language names in HTML classes supported
+  alongside `language-`. Thanks to [Jeff Escalante][].
+- Ruby's got support for interactive console sessions. Thanks to
+  [Pascal Hurni][].
+- Added built-in functions for R language. Thanks to [Artem A. Klevtsov][].
+- Rust's got definition for lifetime parameters and improved string syntax.
+  Thanks to [Roman Shmatov][].
+- Various improvements to Objective-C definition by [Matt Diephouse][].
+- Fixed highlighting of generics in Java.
+
+[ll]: http://highlightjs.readthedocs.org/en/latest/api.html#listlanguages
+[Sindre Sorhus]: https://github.com/sindresorhus
+[Heiko August]: https://github.com/auge8472
+[Nikolay Lisienko]: https://github.com/neor-ru
+[Travis Odom]: https://github.com/Burstaholic
+[Jeff Escalante]: https://github.com/jenius
+[Pascal Hurni]: https://github.com/phurni
+[Jiyin Yiyong]: https://github.com/jiyinyiyong
+[Artem A. Klevtsov]: https://github.com/unikum
+[Roman Shmatov]: https://github.com/shmatov
+[Jeremy Hull]: https://github.com/sourrust
+[Matt Diephouse]: https://github.com/mdiep
+
+## Version 8.0
 
 This new major release is quite a big overhaul bringing both new features and
 some backwards incompatible changes. However, chances are that the majority of
@@ -47,7 +125,7 @@ New features:
   aliases can be specified in the class attribute of the code container in your
   HTML as well as in various API calls. For now there are only a few very common
   aliases but we'll expand it in the future. All of them are listed in the
-  [class reference][].
+  [class reference][cr].
 
 - Language detection can now be restricted to a subset of languages relevant in
   a given context — a web page or even a single highlighting call. This is
@@ -68,7 +146,7 @@ New languages and styles:
 - *Atelier* family of styles in 10 variants by [Bram de Haan][]
 - *Paraíso* styles by [Jan T. Sott][]
 
-Miscelleanous improvements:
+Miscellaneous improvements:
 
 - Highlighting `=>` prompts in Clojure.
 - [Jeremy Hull][] fixed a lot of styles for consistency.
@@ -118,7 +196,7 @@ Improvements:
 - Haskell's got new keywords and now recognizes more things like pragmas,
   preprocessors, modules, containers, FFIs etc. Thanks to [Zena Treep][treep]
   for the implementation and to [Jeremy Hull][sourrust] for guiding it.
-- Miscelleanous fixes in PHP, Brainfuck, SCSS, Asciidoc, CMake, Python and F#.
+- Miscellaneous fixes in PHP, Brainfuck, SCSS, Asciidoc, CMake, Python and F#.
 
 [mehdid]: https://github.com/mehdid
 [nbraud]: https://github.com/nbraud
@@ -156,7 +234,7 @@ This long overdue version is a snapshot of the current source tree with all the
 changes that happened during the past year. Sorry for taking so long!
 
 Along with the changes in code highlight.js has finally got its new home at
-<http://highlightjs.org/>, moving from its craddle on Software Maniacs which it
+<http://highlightjs.org/>, moving from its cradle on Software Maniacs which it
 outgrew a long time ago. Be sure to report any bugs about the site to
 <mailto:info at highlightjs.org>.
 
@@ -395,7 +473,7 @@ recent beta release][beta].
 
 [beta]: http://softwaremaniacs.org/blog/2011/04/25/highlight-js-60-beta/en/
 
-P.S. New version is not yet available on a Yandex' CDN, so for now you have to
+P.S. New version is not yet available on a Yandex CDN, so for now you have to
 download [your own copy][d].
 
 [d]: /soft/highlight/en/download/
@@ -422,7 +500,7 @@ developers.
 - Description of HTML has got new tags from [HTML 5][].
 - CSS-styles have been unified to use consistent padding and also have lost
   pop-outs with names of detected languages.
-- [Igor Kalnitsky][ik] has sent two new language descriptions: CMake и VHDL.
+- [Igor Kalnitsky][ik] has sent two new language descriptions: CMake & VHDL.
 
 This makes total number of languages supported by highlight.js to reach 35.
 
@@ -562,7 +640,8 @@ Also in this version:
 
 ## Version 5.2
 
-- at last it's possible to replace indentation TABs with something sensible (e.g. 2 or 4 spaces)
+- at last it's possible to replace indentation TABs with something sensible
+  (e.g. 2 or 4 spaces)
 - new keywords and built-ins for 1C by Sergey Baranov
 - a couple of small fixes to Apache highlighting
 
diff --git a/README.md b/README.md
index 0ee9637..0e77343 100644
--- a/README.md
+++ b/README.md
@@ -1,167 +1,99 @@
 # Highlight.js
 
-Highlight.js highlights syntax in code examples on blogs, forums and,
-in fact, on any web page. It's very easy to use because it works
-automatically: finds blocks of code, detects a language, highlights it.
+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.
 
-Autodetection can be fine tuned when it fails by itself (see "Heuristics").
 
+## Getting Started
 
-## Basic usage
-
-Link the library and a stylesheet from your page and hook highlighting to
-the page load event:
+The bare minimum for using highlight.js on a web page is linking to the library
+along with one of the styles and calling [`initHighlightingOnLoad`][1]:
 
 ```html
-<link rel="stylesheet" href="styles/default.css">
-<script src="highlight.pack.js"></script>
+<link rel="stylesheet" href="/path/to/styles/default.css">
+<script src="/path/to/highlight.pack.js"></script>
 <script>hljs.initHighlightingOnLoad();</script>
 ```
 
-This will highlight all code on the page marked up as `<pre><code> .. </code></pre>`.
-If you use different markup or need to apply highlighting dynamically, read
-"Custom initialization" below.
-
-- You can download your own customized version of "highlight.pack.js" or
-  use the hosted one as described on the download page:
-  <http://highlightjs.org/download/>
-
-- Style themes are available in the download package or as hosted files.
-  To create a custom style for your site see the class reference in the file
-  [CSS classes reference][cr] from the downloaded package.
-
-[cr]: http://highlightjs.readthedocs.org/en/latest/css-classes-reference.html
-
-
-## node.js
-
-Highlight.js can be used under node.js. The package with all supported languages is
-installable from NPM:
-
-    npm install highlight.js
-
-Alternatively, you can build it from the source with only languages you need:
-
-    python3 tools/build.py -tnode lang1 lang2 ..
-
-Using the library:
-
-```javascript
-var hljs = require('highlight.js');
-
-// If you know the language
-hljs.highlight(lang, code).value;
-
-// Automatic language detection
-hljs.highlightAuto(code).value;
-```
-
-
-## AMD
-
-Highlight.js can be used with an AMD loader.  You will need to build it from
-source in order to do so:
-
-```bash
-$ python3 tools/build.py -tamd lang1 lang2 ..
-```
-
-Which will generate a `build/highlight.pack.js` which will load as an AMD
-module with support for the built languages and can be used like so:
-
-```javascript
-require(["highlight.js/build/highlight.pack"], function(hljs){
-
-  // If you know the language
-  hljs.highlight(lang, code).value;
+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:
 
-  // Automatic language detection
-  hljs.highlightAuto(code).value;
-});
+```html
+<pre><code class="html">...</code></pre>
 ```
 
+The list of supported language classes is available in the [class reference][8].
+Classes can also be prefixed with either `language-` or `lang-`.
 
-## Tab replacement
-
-You can replace TAB ('\x09') characters used for indentation in your code
-with some fixed number of spaces or with a `<span>` to give them special
-styling:
+To disable highlighting altogether use the `no-highlight` class:
 
 ```html
-<script type="text/javascript">
-  hljs.configure({tabReplace: '    '}); // 4 spaces
-  // ... or
-  hljs.configure({tabReplace: '<span class="indent">\t</span>'});
-
-  hljs.initHighlightingOnLoad();
-</script>
+<pre><code class="no-highlight">...</code></pre>
 ```
 
-## Custom initialization
+## Custom Initialization
 
-If you use different markup for code blocks you can initialize them manually
-with `highlightBlock(code)` function. It takes a DOM element containing the
-code to highlight and optionally a string with which to replace TAB
-characters.
+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*.
 
-Initialization using, for example, jQuery might look like this:
+Here's an equivalent way to calling [`initHighlightingOnLoad`][1] using jQuery:
 
 ```javascript
 $(document).ready(function() {
-  $('pre code').each(function(i, e) {hljs.highlightBlock(e)});
-});
+  $('pre code').each(function(i, block) {
+    hljs.highlightBlock(block);
+  });
+};)
 ```
 
-You can use `highlightBlock` to highlight blocks dynamically inserted into
-the page. Just make sure you don't do it twice for already highlighted
-blocks.
-
-If your code container relies on `<br>` tags instead of line breaks (i.e. if
-it's not `<pre>`) set the `useBR` option to `true`:
+You can use any tags instead of `<pre><code>` to mark up your code. If you don't
+use a container that preserve line breaks you will need to configure
+highlight.js to use the `<br>` tag:
 
 ```javascript
 hljs.configure({useBR: true});
-$('div.code').each(function(i, e) {hljs.highlightBlock(e)});
-```
 
+$('div.code').each(function(i, block) {
+  hljs.highlightBlock(block);
+});
+```
 
-## Heuristics
+For other options refer to the documentation for [`configure`][3].
 
-Autodetection of a code's language is done using a simple heuristic:
-the program tries to highlight a fragment with all available languages and
-counts all syntactic structures that it finds along the way. The language
-with greatest count wins.
 
-This means that in short fragments the probability of an error is high
-(and it really happens sometimes). In this cases you can set the fragment's
-language explicitly by assigning a class to the `<code>` element:
+## Getting the Library
 
-```html
-<pre><code class="html">...</code></pre>
-```
+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.
 
-You can use class names recommended in HTML5: "language-html",
-"language-php". Classes also can be assigned to the `<pre>` element.
+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
+refer to the [building documentation][5].
 
-To disable highlighting of a fragment altogether use "no-highlight" class:
 
-```html
-<pre><code class="no-highlight">...</code></pre>
-```
+## License
 
+Highlight.js is released under the BSD License. See [LICENSE][10] file for
+details.
 
-## Export
 
-File export.html contains a little program that allows you to paste in a code
-snippet and then copy and paste the resulting HTML code generated by the
-highlighter. This is useful in situations when you can't use the script itself
-on a site.
+## Links
 
+The official site for the library is at <http://highlightjs.org/>.
 
-## Meta
+Further in-depth documentation for the API and other topics is at
+<http://highlightjs.readthedocs.org/>.
 
-- Version: 8.0
-- URL:     http://highlightjs.org/
+Authors and contributors are listed in the [AUTHORS.en.txt][9] file.
 
-For the license terms see LICENSE files.
-For authors and contributors see AUTHORS.en.txt file.
+[1]: http://highlightjs.readthedocs.org/en/latest/api.html#inithighlightingonload
+[2]: http://highlightjs.readthedocs.org/en/latest/api.html#highlightblock-block
+[3]: http://highlightjs.readthedocs.org/en/latest/api.html#configure-options
+[4]: http://highlightjs.org/download/
+[5]: http://highlightjs.readthedocs.org/en/latest/building-testing.html
+[8]: http://highlightjs.readthedocs.org/en/latest/css-classes-reference.html
+[9]: https://github.com/isagalaev/highlight.js/blob/master/AUTHORS.en.txt
+[10]: https://github.com/isagalaev/highlight.js/blob/master/LICENSE
diff --git a/README.ru.md b/README.ru.md
index 0d0e0fe..f6cb3cb 100644
--- a/README.ru.md
+++ b/README.ru.md
@@ -1,171 +1,101 @@
 # Highlight.js
 
-Highlight.js нужен для подсветки синтаксиса в примерах кода в блогах,
-форумах и вообще на любых веб-страницах. Пользоваться им очень просто,
-потому что работает он автоматически: сам находит блоки кода, сам
-определяет язык, сам подсвечивает.
+Highlight.js — это подсветчик синтаксиса, написанный на JavaScript. Он работает
+и в браузере, и на сервере. Он работает с практически любой HTML разметкой, не
+зависит от каких-либо фреймворков и умеет автоматически определять язык.
 
-Автоопределением языка можно управлять, когда оно не справляется само (см.
-дальше "Эвристика").
 
+## Начало работы
 
-## Простое использование
-
-Подключите библиотеку и стиль на страницу и повесть вызов подсветки на
-загрузку страницы:
+Минимум, что нужно сделать для использования highlight.js на веб-странице — это
+подключить библиотеку, CSS-стили и вызывать [`initHighlightingOnLoad`][1]:
 
 ```html
-<link rel="stylesheet" href="styles/default.css">
-<script src="highlight.pack.js"></script>
+<link rel="stylesheet" href="/path/to/styles/default.css">
+<script src="/path/to/highlight.pack.js"></script>
 <script>hljs.initHighlightingOnLoad();</script>
 ```
 
-Весь код на странице, обрамлённый в теги `<pre><code> .. </code></pre>`
-будет автоматически подсвечен. Если вы используете другие теги или хотите
-подсвечивать блоки кода динамически, читайте "Инициализацию вручную" ниже.
-
-- Вы можете скачать собственную версию "highlight.pack.js" или сослаться
-  на захостенный файл, как описано на странице загрузки:
-  <http://highlightjs.org/download/>
-
-- Стилевые темы можно найти в загруженном архиве или также использовать
-  захостенные. Чтобы сделать собственный стиль для своего сайта, вам
-  будет полезен [CSS classes reference][cr], который тоже есть в архиве.
-
-[cr]: http://highlightjs.readthedocs.org/en/latest/css-classes-reference.html
-
-
-## node.js
-
-Highlight.js можно использовать в node.js. Библиотеку со всеми возможными языками можно
-установить с NPM:
-
-    npm install highlight.js
-
-Также её можно собрать из исходников с только теми языками, которые нужны:
-
-    python3 tools/build.py -tnode lang1 lang2 ..
-
-Использование библиотеки:
-
-```javascript
-var hljs = require('highlight.js');
-
-// Если вы знаете язык
-hljs.highlight(lang, code).value;
-
-// Автоопределение языка
-hljs.highlightAuto(code).value;
-```
-
-
-## AMD
-
-Highlight.js можно использовать с загрузчиком AMD-модулей.  Для этого его
-нужно собрать из исходников следующей командой:
-
-```bash
-$ python3 tools/build.py -tamd lang1 lang2 ..
-```
-
-Она создаст файл `build/highlight.pack.js`, который является загружаемым
-AMD-модулем и содержит все выбранные при сборке языки. Используется он так:
+Библиотека найдёт и раскрасит код внутри тегов `<pre><code>`, попытавшись
+автоматически определить язык. Когда автоопределение не срабатывает, можно явно
+указать язык в атрибуте class:
 
-```javascript
-require(["highlight.js/build/highlight.pack"], function(hljs){
-
-  // Если вы знаете язык
-  hljs.highlight(lang, code).value;
-
-  // Автоопределение языка
-  hljs.highlightAuto(code).value;
-});
+```html
+<pre><code class="html">...</code></pre>
 ```
 
+Список поддерживаемых классов языков доступен в [справочнике по классам][8].
+Класс также можно предваоить префиксами `language-` или `lang-`.
 
-## Замена TABов
-
-Также вы можете заменить символы TAB ('\x09'), используемые для отступов, на
-фиксированное количество пробелов или на отдельный `<span>`, чтобы задать ему
-какой-нибудь специальный стиль:
+Чтобы отключить подсветку для какого-то блока, используйте класс `no-highlight`:
 
 ```html
-<script type="text/javascript">
-  hljs.configure({tabReplace: '    '}); // 4 spaces
-  // ... or
-  hljs.configure({tabReplace: '<span class="indent">\t</span>'});
-
-  hljs.initHighlightingOnLoad();
-</script>
+<pre><code class="no-highlight">...</code></pre>
 ```
 
-
 ## Инициализация вручную
 
-Если вы используете другие теги для блоков кода, вы можете инициализировать их
-явно с помощью функции `highlightBlock(code)`. Она принимает DOM-элемент с
-текстом расцвечиваемого кода и опционально - строчку для замены символов TAB.
+Чтобы иметь чуть больше контроля за инициализацией подсветки, вы можете
+использовать функции [`highlightBlock`][2] и [`configure`][3]. Таким образом
+можно управлять тем, *что* подсвечивать и *когда*.
 
-Например с использованием jQuery код инициализации может выглядеть так:
+Вот пример инициализация, эквивалентной вызову [`initHighlightingOnLoad`][1], но
+с использованием jQuery:
 
 ```javascript
 $(document).ready(function() {
-  $('pre code').each(function(i, e) {hljs.highlightBlock(e)});
-});
+  $('pre code').each(function(i, block) {
+    hljs.highlightBlock(block);
+  });
+};)
 ```
 
-`highlightBlock` можно также использовать, чтобы подсветить блоки кода,
-добавленные на страницу динамически. Только убедитесь, что вы не делаете этого
-повторно для уже раскрашенных блоков.
-
-Если ваш блок кода использует `<br>` вместо переводов строки (т.е. если это не
-`<pre>`), включите опцию `useBR`:
+Вы можете использовать любые теги разметки вместо `<pre><code>`. Если
+используете контейнер, не сохраняющий переводы строк, вам нужно сказать
+highlight.js использовать для них тег `<br>`:
 
 ```javascript
 hljs.configure({useBR: true});
-$('div.code').each(function(i, e) {hljs.highlightBlock(e)});
-```
 
+$('div.code').each(function(i, block) {
+  hljs.highlightBlock(block);
+});
+```
 
-## Эвристика
+Другие опции можно найти в документации функции [`configure`][3].
 
-Определение языка, на котором написан фрагмент, делается с помощью
-довольно простой эвристики: программа пытается расцветить фрагмент всеми
-языками подряд, и для каждого языка считает количество подошедших
-синтаксически конструкций и ключевых слов. Для какого языка нашлось больше,
-тот и выбирается.
 
-Это означает, что в коротких фрагментах высока вероятность ошибки, что
-периодически и случается. Чтобы указать язык фрагмента явно, надо написать
-его название в виде класса к элементу `<code>`:
+## Установка библиотеки
 
-```html
-<pre><code class="html">...</code></pre>
-```
+Highlight.js можно использовать в браузере прямо с CDN хостинга или скачать
+индивидуальную сборку, а также установив модуль на сервере. На
+[страница загрузки][4] подробно описаны все варианты.
 
-Можно использовать рекомендованные в HTML5 названия классов:
-"language-html", "language-php". Также можно назначать классы на элемент
-`<pre>`.
+Обратите внимание, что библиотека не предназначена для использования в виде
+исходного кода на GitHub, а требует отдельной сборки. Если вам не подходит ни
+один из готовых вариантов, читайте [документацию по сборке][5].
 
-Чтобы запретить расцветку фрагмента вообще, используется класс "no-highlight":
 
-```html
-<pre><code class="no-highlight">...</code></pre>
-```
+## Лицензия
 
+Highlight.js распространяется под лицензией BSD. Подробнее читайте файл
+[LICENSE][10].
 
-## Экспорт
 
-В файле export.html находится небольшая программка, которая показывает и дает
-скопировать непосредственно HTML-код подсветки для любого заданного фрагмента кода.
-Это может понадобится например на сайте, на котором нельзя подключить сам скрипт
-highlight.js.
+## Ссылки
 
+Официальный сайт билиотеки расположен по адресу <http://highlightjs.org/>.
 
-## Координаты
+Более подробная документация по API и другим темам расположена на
+<http://highlightjs.readthedocs.org/>.
 
-- Версия: 8.0
-- URL:    http://highlightjs.org/
+Авторы и контрибьютора перечислена в файле [AUTHORS.ru.txt][9] file.
 
-Лицензионное соглашение читайте в файле LICENSE.
-Список авторов и соавторов читайте в файле AUTHORS.ru.txt
+[1]: http://highlightjs.readthedocs.org/en/latest/api.html#inithighlightingonload
+[2]: http://highlightjs.readthedocs.org/en/latest/api.html#highlightblock-block
+[3]: http://highlightjs.readthedocs.org/en/latest/api.html#configure-options
+[4]: http://highlightjs.org/download/
+[5]: http://highlightjs.readthedocs.org/en/latest/building-testing.html
+[8]: http://highlightjs.readthedocs.org/en/latest/css-classes-reference.html
+[9]: https://github.com/isagalaev/highlight.js/blob/master/AUTHORS.ru.txt
+[10]: https://github.com/isagalaev/highlight.js/blob/master/LICENSE
diff --git a/docs/api.rst b/docs/api.rst
index dc42995..fac28e5 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -60,7 +60,7 @@ Configures global options:
 
 * ``tabReplace``: a string used to replace TAB characters in indentation.
 * ``useBR``: a flag to generate ``<br>`` tags instead of new-line characters in the output, useful when code is marked up using a non-``<pre>`` container.
-* ``classPrefix``: a sting prefix added before class names in the generated markup, used for backwards compatibility with stylesheets.
+* ``classPrefix``: a string prefix added before class names in the generated markup, used for backwards compatibility with stylesheets.
 * ``languages``: an array of language names and aliases restricting auto detection to only these languages.
 
 Accepts an object representing options with the values to updated. Other options don't change
@@ -98,6 +98,13 @@ Adds new language to the library under the specified name. Used mostly internall
   to use common regular expressions defined within it.
 
 
+``listLanguages()``
+----------------------------
+
+Returns the languages names list.
+
+
+
 .. _getLanguage:
 
 
diff --git a/docs/building-testing.rst b/docs/building-testing.rst
index 94ad7a5..802e745 100644
--- a/docs/building-testing.rst
+++ b/docs/building-testing.rst
@@ -43,5 +43,5 @@ highlight.js with only the language you're working on without compression
 (to have readable code in browser error messages). After this you have to build
 the entire package with all the languages and see if anything is broken. If your
 language breaks auto-detection it should be fixed by
-:ref:`improving relevance <relevance>` and is a black art in and of itself. When
-in doubt, please refer to the discussion group!
+:ref:`improving relevance <relevance>`, which is a black art in and of itself.
+When in doubt, please refer to the discussion group!
diff --git a/docs/conf.py b/docs/conf.py
index 09e811c..c79a852 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -48,9 +48,9 @@ copyright = u'2012, Ivan Sagalaev'
 # built documents.
 #
 # The short X.Y version.
-version = '8.0'
+version = '8.1'
 # The full version, including alpha/beta/rc tags.
-release = '8.0'
+release = '8.1'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
diff --git a/docs/css-classes-reference.rst b/docs/css-classes-reference.rst
index 376a083..d692c5a 100644
--- a/docs/css-classes-reference.rst
+++ b/docs/css-classes-reference.rst
@@ -5,8 +5,8 @@ This is a full list of available classes corresponding to languages'
 syntactic structures. The parentheses after language name contain identifiers
 used as class names in ``<code>`` element.
 
-Python ("python")
------------------
+Python ("python", "py", "gyp")
+------------------------------
 
 * ``keyword``:          keyword
 * ``built_in``:         built-in objects (None, False, True and Ellipsis)
@@ -33,8 +33,8 @@ Python profiler results ("profile")
 * ``title``:            actual name of a function in an entry (excluding parentheses)
 * ``prompt``:           interpreter prompt (>>> or ...)
 
-Ruby ("ruby")
--------------
+Ruby ("ruby", "rb", "gemspec", "podspec", "thor", "irb")
+--------------------------------------------------------
 
 * ``keyword``:          keyword
 * ``string``:           string
@@ -46,6 +46,10 @@ Ruby ("ruby")
 * ``title``:            name of a function or a class inside a header
 * ``parent``:           name of a parent class
 * ``symbol``:           symbol
+* ``input``:            complete input line (interpreter)
+* ``output``:           complete output line  (interpreter)
+* ``prompt``:           interpreter prompt (>>)
+* ``status``:           interpreter response (=>)
 
 Haml ("haml")
 -------------
@@ -60,8 +64,8 @@ Haml ("haml")
 * ``doctype``:          !!! declaration
 * ``bullet``:           line defined by variable
 
-Perl ("perl")
--------------
+Perl ("perl", "pl")
+-------------------
 
 * ``keyword``:          keyword
 * ``comment``:          comment
@@ -73,8 +77,8 @@ Perl ("perl")
 * ``operator``:         operator
 * ``pod``:              plain old doc
 
-PHP ("php")
------------
+PHP ("php", "php3", "php4", "php5", "php6")
+-------------------------------------------
 
 * ``keyword``:          keyword
 * ``number``:           number
@@ -110,8 +114,18 @@ Go ("go", "golang")
 * ``typename``:         built-in plain types (int, string etc.)
 * ``built_in``:         built-in functions
 
-HTML, XML ("xml", "html")
--------------------------
+Gradle ("gradle")
+-----------------
+
+* ``keyword``:          keyword
+* ``number``:           number
+* ``string``:           string and character
+* ``comment``:          comment
+* ``regexp``:           regular expression
+
+
+HTML, XML ("xml", "html", "xhtml", "rss", "atom", "xsl", "plist")
+-----------------------------------------------------------------
 
 * ``tag``:              any tag from "<" till ">"
 * ``attribute``:        tag's attribute with or without value
@@ -148,7 +162,7 @@ CSS ("css")
 * ``class``:            .some_name in selectors
 * ``at_rule``:          @-rule till first "{" or ";"
 * ``attr_selector``:    attribute selector (square brackets in a[href^=http://])
-* ``pseudo``:           pseudo classes and elemens (:after, ::after etc.)
+* ``pseudo``:           pseudo classes and elements (:after, ::after etc.)
 * ``comment``:          comment
 * ``rules``:            everything from "{" till "}"
 * ``attribute``:        property name inside a rule
@@ -167,7 +181,7 @@ SCSS ("scss")
 * ``class``:            .some_name in selectors
 * ``at_rule``:          @-rule till first "{" or ";"
 * ``attr_selector``:    attribute selector (square brackets in a[href^=http://])
-* ``pseudo``:           pseudo classes and elemens (:after, ::after etc.)
+* ``pseudo``:           pseudo classes and elements (:after, ::after etc.)
 * ``comment``:          comment
 * ``rules``:            everything from "{" till "}"
 * ``attribute``:        property name inside a rule
@@ -180,8 +194,8 @@ SCSS ("scss")
 * ``variable``:         variable starting with "$"
 * ``preprocessor``:     keywords after @
 
-Markdown ("markdown")
----------------------
+Markdown ("markdown", "md", "mkdown", "mkd")
+--------------------------------------------
 
 * ``header``:            header
 * ``bullet``:            list bullet
@@ -210,14 +224,14 @@ AsciiDoc ("asciidoc")
 * ``attribute``:         document attribute, block attributes
 * ``label``:             admonition label
 
-Django ("django")
------------------
+Django ("django", "jinja")
+--------------------------
 
 * ``keyword``:          HTML tag in HTML, default tags and default filters in templates
 * ``tag``:              any tag from "<" till ">"
 * ``comment``:          comment
 * ``doctype``:          <!DOCTYPE ... > declaration
-* ``attribute``:        tag's attribute with or withou value
+* ``attribute``:        tag's attribute with or without value
 * ``value``:            attribute's value
 * ``template_tag``:     template tag {% .. %}
 * ``variable``:         template variable {{ .. }}
@@ -225,8 +239,8 @@ Django ("django")
 * ``filter``:           filter from "|" till the next filter or the end of tag
 * ``argument``:         filter argument
 
-Handlebars ("handlebars")
--------------------------
+Handlebars ("handlebars", "hbs", "html.hbs", "html.handlebars")
+---------------------------------------------------------------
 
 * ``expression``:       expression to be evaluated
 * ``variable``:         variable
@@ -266,8 +280,22 @@ JavaScript ("javascript", "js")
 * ``params``:           parentheses and everything inside them in a function's header
 * ``pi``:               'use strict' processing instruction
 
-CoffeeScript ("coffeescript")
------------------------------
+TypeScript ("typescript", "ts")
+-------------------------------
+
+* ``keyword``:          keyword
+* ``comment``:          comment
+* ``number``:           number
+* ``literal``:          special literal: "true", "false" and "null"
+* ``string``:           string
+* ``regexp``:           regular expression
+* ``function``:         header of a function
+* ``title``:            name of a function inside a header
+* ``params``:           parentheses and everything inside them in a function's header
+* ``pi``:               'use strict' processing instruction
+
+CoffeeScript ("coffeescript", "coffee", "cson", "iced")
+-------------------------------------------------------
 
 * ``keyword``:          keyword
 * ``comment``:          comment
@@ -283,8 +311,8 @@ CoffeeScript ("coffeescript")
 * ``params``:           parentheses and everything inside them in a function's header
 * ``property``:         @-property within class and functions
 
-ActionScript ("actionscript")
------------------------------
+ActionScript ("actionscript", "as")
+-----------------------------------
 
 * ``comment``:          comment
 * ``string``:           string
@@ -301,8 +329,26 @@ ActionScript ("actionscript")
 * ``param``:            params of function
 * ``rest_arg``:         rest argument of function
 
-VBScript ("vbscript")
----------------------
+Haxe ("haxe", "hx")
+--------------------
+
+* ``comment``:          comment
+* ``string``:           string
+* ``number``:           number
+* ``keyword``:          keywords
+* ``literal``:          literal
+* ``reserved``:         reserved keyword
+* ``title``:            name of declaration (package, class or function)
+* ``preprocessor``:     preprocessor directive (if, else, elseif, error)
+* ``type``:             type of returned value (for functions)
+* ``package``:          package (named or not)
+* ``class``:            class/interface
+* ``function``:         function
+* ``param``:            params of function
+* ``rest_arg``:         rest argument of function
+
+VBScript ("vbscript", "vbs")
+----------------------------
 
 * ``keyword``:          keyword
 * ``number``:           number
@@ -310,8 +356,8 @@ VBScript ("vbscript")
 * ``comment``:          comment
 * ``built_in``:         built-in function
 
-VB.Net ("vbnet")
-----------------
+VB.Net ("vbnet", "vb")
+----------------------
 
 * ``keyword``:          keyword
 * ``built_in``:         built-in types
@@ -321,6 +367,45 @@ VB.Net ("vbnet")
 * ``xmlDocTag``:        xmldoc tag ("'''", "<!--", "-->", "<..>")
 * ``preprocessor``:     preprocessor directive
 
+Protocol Buffers ("protobuf")
+-----------------------------
+
+* ``keyword``:          keyword
+* ``built_in``:         built-in types (e.g. `int64`, `string`)
+* ``string``:           string
+* ``number``:           number
+* ``literal``:          "true" and "false"
+* ``comment``:          comment
+* ``class``:            message, service or enum definition header
+* ``title``:            message, service or enum identifier
+* ``function``:         RPC call identifier
+
+Cap’n Proto ("capnproto", "capnp")
+----------------------------------
+
+* ``shebang``:          message identifier
+* ``keyword``:          keyword
+* ``built_in``:         built-in types (e.g. `Int64`, `Text`)
+* ``string``:           string
+* ``number``:           number or field number (e.g. @N)
+* ``literal``:          "true" and "false"
+* ``comment``:          comment
+* ``class``:            message, interface or enum definition header
+* ``title``:            message, interface or enum identifier
+
+Thrift ("thrift")
+-----------------
+
+* ``keyword``:          keyword
+* ``built_in``:         built-in types (e.g. `byte`, `i32`)
+* ``string``:           string
+* ``number``:           number
+* ``literal``:          "true" and "false"
+* ``comment``:          comment
+* ``class``:            struct, enum, service or exception definition header
+* ``title``:            struct, enum, service or exception identifier
+* ``stl_container``:    instantiation of STL-like containers ("list<...>")
+
 HTTP ("http")
 -------------
 
@@ -367,13 +452,13 @@ Oxygene ("oxygene")
 * ``number``:           number
 * ``class``:            class' body from "= class" till "end;"
 
-Java ("java")
--------------
+Java ("java", "jsp")
+--------------------
 
 * ``keyword``:          keyword
 * ``number``:           number
 * ``string``:           string
-* ``comment``:          commment
+* ``comment``:          comment
 * ``annotaion``:        annotation
 * ``javadoc``:          javadoc comment
 * ``class``:            class header from "class" till "{"
@@ -381,8 +466,8 @@ Java ("java")
 * ``params``:           everything in parentheses inside a class header
 * ``inheritance``:      keywords "extends" and "implements" inside class header
 
-C++ ("cpp", "c")
-----------------
+C++ ("cpp", "c", "h", "c++", "h++")
+-----------------------------------
 
 * ``keyword``:          keyword
 * ``number``:           number
@@ -391,8 +476,8 @@ C++ ("cpp", "c")
 * ``preprocessor``:     preprocessor directive
 * ``stl_container``:    instantiation of STL containers ("vector<...>")
 
-Objective C ("objectivec")
---------------------------
+Objective C ("objectivec", "m", "mm", "objc", "obj-c")
+------------------------------------------------------
 
 * ``keyword``:          keyword
 * ``built_in``:         Cocoa/Cocoa Touch constants and classes
@@ -402,7 +487,7 @@ Objective C ("objectivec")
 * ``preprocessor``:     preprocessor directive
 * ``class``:            interface/implementation, protocol and forward class declaration
 * ``title``:            title (id) of interface, implementation, protocol, class
-* ``variable``:         properties and struct accesors
+* ``variable``:         properties and struct accessors
 
 Vala ("vala")
 -------------
@@ -415,34 +500,34 @@ Vala ("vala")
 * ``title``:            in class definition
 * ``constant``:         ALL_UPPER_CASE
 
-C# ("cs")
----------
+C# ("cs", "csharp")
+-------------------
 
 * ``keyword``:          keyword
 * ``number``:           number
 * ``string``:           string
-* ``comment``:          commment
+* ``comment``:          comment
 * ``xmlDocTag``:        xmldoc tag ("///", "<!--", "-->", "<..>")
 * ``title``:            title of namespace or class
 
-F# ("fsharp")
--------------
+F# ("fsharp", "fs")
+-------------------
 
 * ``keywords``:         keyword
 * ``number``:           number
 * ``string``:           string
-* ``commment``:         comment
+* ``comment``:          comment
 * ``class``:            any custom F# type
 * ``title``:            the name of a custom F# type
 * ``annotation``:       any attribute
 
-OCaml ("ocaml")
----------------
+OCaml ("ocaml", "ml")
+---------------------
 
 * ``keywords``:         keyword
 * ``number``:           number
 * ``string``:           string
-* ``commment``:         comment\
+* ``comment``:          comment
 * ``class``:            any custom OCaml type
 * ``title``:            the name of a custom OCaml type
 * ``annotation``:       any attribute
@@ -465,7 +550,7 @@ RenderMan RSL ("rsl")
 * ``string``:           string (including @"..")
 * ``comment``:          comment
 * ``preprocessor``:     preprocessor directive
-* ``shader``:           sahder keywords
+* ``shader``:           shader keywords
 * ``shading``:          shading keywords
 * ``built_in``:         built-in function
 
@@ -490,19 +575,20 @@ Maya Embedded Language ("mel")
 SQL ("sql")
 -----------
 
-* ``keyword``:          keyword (mostly SQL'92 and SQL'99)
+* ``keyword``:          keyword (mostly SQL'92, SQL'99 and T-SQL)
+* ``literal``:          special literal: "true" and "false"
+* ``built_in``:         built-in type name
 * ``number``:           number
 * ``string``:           string (of any type: "..", '..', \`..\`)
 * ``comment``:          comment
-* ``aggregate``:        aggregate function
 
-Smalltalk ("smalltalk")
------------------------
+Smalltalk ("smalltalk", "st")
+-----------------------------
 
 * ``keyword``:          keyword
 * ``number``:           number
 * ``string``:           string
-* ``comment``:          commment
+* ``comment``:          comment
 * ``symbol``:           symbol
 * ``array``:            array
 * ``class``:            name of a class
@@ -515,7 +601,7 @@ Lisp ("lisp")
 * ``keyword``:          keyword
 * ``number``:           number
 * ``string``:           string
-* ``comment``:          commment
+* ``comment``:          comment
 * ``variable``:         variable
 * ``literal``:          b, t and nil
 * ``list``:             non-quoted list
@@ -523,8 +609,8 @@ Lisp ("lisp")
 * ``body``:             remainder of the non-quoted list
 * ``quoted``:           quoted list, both "(quote .. )" and "'(..)"
 
-Clojure ("clojure")
--------------------
+Clojure ("clojure", "clj")
+--------------------------
 
 * ``comment``:          comments and hints
 * ``string``:           string
@@ -543,19 +629,19 @@ Ini ("ini")
 * ``number``:           number
 * ``keyword``:          boolean value keyword
 
-Apache ("apache")
------------------
+Apache ("apache", "apacheconf")
+-------------------------------
 
 * ``keyword``:          keyword
 * ``number``:           number
-* ``comment``:          commment
+* ``comment``:          comment
 * ``literal``:          On and Off
 * ``sqbracket``:        variables in rewrites "%{..}"
 * ``cbracket``:         options in rewrites "[..]"
 * ``tag``:              begin and end of a configuration section
 
-Nginx ("nginx")
----------------
+Nginx ("nginx", "nginxconf")
+----------------------------
 
 * ``title``:            directive title
 * ``string``:           string
@@ -565,8 +651,8 @@ Nginx ("nginx")
 * ``variable``:         $-variable
 * ``regexp``:           regexp
 
-Diff ("diff")
--------------
+Diff ("diff", "patch")
+----------------------
 
 * ``header``:           file header
 * ``chunk``:            chunk header within a file
@@ -574,8 +660,8 @@ Diff ("diff")
 * ``deletion``:         deleted lines
 * ``change``:           changed lines
 
-DOS ("dos")
------------
+DOS ("dos", "bat", "cmd")
+-------------------------
 
 * ``keyword``:          keyword
 * ``flow``:             batch control keyword
@@ -583,19 +669,19 @@ DOS ("dos")
 * ``winutils``:         some commands (see dos.js specifically)
 * ``envvar``:           environment variables
 
-Bash ("bash")
--------------
+Bash ("bash", "sh", "zsh")
+--------------------------
 
 * ``keyword``:          keyword
 * ``string``:           string
 * ``number``:           number
 * ``comment``:          comment
-* ``literal``:          special literal: "true" и "false"
+* ``literal``:          special literal: "true" and "false"
 * ``variable``:         variable
 * ``shebang``:          script interpreter header
 
-Makefile ("makefile")
----------------------
+Makefile ("makefile", "mk", "mak")
+----------------------------------
 
 * ``keyword``:          keyword ".PHONY" within the phony line
 * ``string``:           string
@@ -604,23 +690,47 @@ Makefile ("makefile")
 * ``title``:            target title
 * ``constant``:         constant within the initial definition
 
-CMake ("cmake")
----------------
+CMake ("cmake", "cmake.in")
+---------------------------
 
 * ``keyword``:          keyword
 * ``number``:           number
 * ``string``:           string
-* ``comment``:          commment
+* ``comment``:          comment
 * ``envvar``:           $-variable
 * ``operator``:         operator (LESS, STREQUAL, MATCHES, etc)
 
+Nix ("nix")
+-----------
+
+* ``keyword``:          keyword
+* ``built_in``:         built-in constant
+* ``number``:           number
+* ``string``:           single and double quotes
+* ``subst``:            antiquote ${}
+* ``comment``:          comment
+* ``variable``:         function parameter name
+
+NSIS ("nsis")
+-------------
+
+* ``symbol``:           directory constants
+* ``number``:           number
+* ``constant``:         definitions, language-strings, compiler commands
+* ``variable``:         $-variable
+* ``string``:           string
+* ``comment``:          comment
+* ``params``:           parameters
+* ``keyword``:          keywords
+* ``literal``:          keyword options
+
 Axapta ("axapta")
 -----------------
 
 * ``keyword``:          keyword
 * ``number``:           number
 * ``string``:           string
-* ``comment``:          commment
+* ``comment``:          comment
 * ``class``:            class header from "class" till "{"
 * ``title``:            class name inside a header
 * ``params``:           everything in parentheses inside a class header
@@ -644,12 +754,26 @@ Oracle Rules Language ("ruleslanguage")
 * ``number``:           number
 * ``date``:             date
 * ``string``:           string
-* ``comment``:          commment
-* ``function``:         header of function or procudure
+* ``comment``:          comment
+* ``function``:         header of function or procedure
 * ``title``:            function name inside a header
 * ``params``:           everything in parentheses inside a function header
 * ``preprocessor``:     preprocessor directive
 
+x86 Assembly ("x86asm")
+-----------------------
+
+* ``keyword``:          instruction mnemonic
+* ``literal``:          register name
+* ``pseudo``:           assembler's pseudo instruction
+* ``preprocessor``:     macro
+* ``built_in``:         assembler's keyword
+* ``comment``:          comment
+* ``number``:           number
+* ``string``:           string
+* ``label``:            jump label
+* ``argument``:         macro's argument
+
 AVR assembler ("avrasm")
 ------------------------
 
@@ -657,7 +781,7 @@ AVR assembler ("avrasm")
 * ``built_in``:         pre-defined register
 * ``number``:           number
 * ``string``:           string
-* ``comment``:          commment
+* ``comment``:          comment
 * ``label``:            label
 * ``preprocessor``:     preprocessor directive
 * ``localvars``:        substitution in .macro
@@ -668,7 +792,7 @@ VHDL ("vhdl")
 * ``keyword``:          keyword
 * ``number``:           number
 * ``string``:           string
-* ``comment``:          commment
+* ``comment``:          comment
 * ``literal``:          signal logical value
 * ``typename``:         typename
 * ``attribute``:        signal attribute
@@ -678,7 +802,7 @@ Parser3 ("parser3")
 
 * ``keyword``:          keyword
 * ``number``:           number
-* ``comment``:          commment
+* ``comment``:          comment
 * ``variable``:         variable starting with "$"
 * ``preprocessor``:     preprocessor directive
 * ``title``:            user-defined name starting with "@"
@@ -709,8 +833,8 @@ TeX ("tex")
 * ``formula``:          formula
 * ``special``:          special symbol
 
-Haskell ("haskell")
--------------------
+Haskell ("haskell", "hs")
+-------------------------
 
 * ``comment``:          comment
 * ``pragma``:           GHC pragma
@@ -730,8 +854,8 @@ Haskell ("haskell")
 * ``foreign``:          FFI declaration
 * ``shebang``:          shebang line
 
-Erlang ("erlang")
------------------
+Erlang ("erlang", "erl")
+------------------------
 
 * ``comment``:          comment
 * ``string``:           string
@@ -743,8 +867,24 @@ Erlang ("erlang")
 * ``pp``:.keywords      module's attribute (-attribute)
 * ``function_name``:    atom or atom:atom in case of function call
 
-Rust ("rust")
--------------
+Elixir ("elixir")
+-----------------
+
+*  ``keyword``:         keyword
+*  ``string``:          string
+*  ``subst``:           in-string substitution (#{...})
+*  ``comment``:         comment
+*  ``function``:        function header "def some_name(...):"
+*  ``class``:           defmodule and defrecord headers
+*  ``title``:           name of a function or a module inside a header
+*  ``symbol``:          atom
+*  ``constant``:        name of a module
+*  ``number``:          number
+*  ``variable``:        variable
+*  ``regexp``:          regexp
+
+Rust ("rust", "rs")
+-------------------
 
 * ``comment``:          comment
 * ``string``:           string
@@ -766,8 +906,8 @@ Matlab ("matlab")
 * ``matrix``:           matrix in [ .. ]
 * ``cell``:             cell in { .. }
 
-Scilab ("scilab")
------------------
+Scilab ("scilab", "sci")
+------------------------
 
 * ``comment``:          comment
 * ``string``:           string
@@ -784,8 +924,7 @@ R ("r")
 * ``comment``:          comment
 * ``string``:           string constant
 * ``number``:           number
-* ``keyword``:          language keywords (function, if) plus "structural"
-                   functions (attach, require, setClass)
+* ``keyword``:          language keywords (function, if) plus "structural" functions (attach, require, setClass)
 * ``literal``:          special literal: TRUE, FALSE, NULL, NA, etc.
 
 OpenGL Shading Language ("glsl")
@@ -798,8 +937,8 @@ OpenGL Shading Language ("glsl")
 * ``built_in``:         GLSL built-in functions and variables
 * ``literal``:          true false
 
-AppleScript ("applescript")
----------------------------
+AppleScript ("applescript", "osascript")
+----------------------------------------
 
 * ``keyword``:          keyword
 * ``command``:          core AppleScript command
@@ -811,8 +950,20 @@ AppleScript ("applescript")
 * ``comment``:          comment
 * ``title``:            name of a handler
 
-Brainfuck ("brainfuck")
------------------------
+Vim Script ("vim")
+------------------
+
+* ``keyword``:          keyword
+* ``built_in``:         built-in functions
+* ``string``:           string, comment
+* ``number``:           number
+* ``function``:         function header "function Foo(...)"
+* ``title``:            name of a function
+* ``params``:           everything inside parentheses in a function's header
+* ``variable``:         vim variables with different visibilities "g:foo, b:bar"
+
+Brainfuck ("brainfuck", "bf")
+-----------------------------
 
 * ``title``:            Brainfuck while loop command
 * ``literal``:          Brainfuck inc and dec commands
@@ -837,8 +988,58 @@ AutoHotkey ("autohotkey")
 * ``var_expand``:       variable expansion (enclosed in percent sign)
 * ``label``:            label, hotkey label, hotstring label
 
+Monkey ("monkey")
+-----------------
+
+* ``keyword``:          keyword
+* ``built_in``:         built-in functions, variables and types of variables
+* ``literal``:          True, False, Null, And, Or, Shl, Shr, Mod
+* ``string``:           string
+* ``comment``:          comment
+* ``number``:           number
+* ``function``:         header of a function, method and constructor
+* ``class``:            class header
+* ``title``:            name of an alias, class, interface, function or method inside a header
+* ``variable``:         self and super keywords
+* ``preprocessor``:     import and preprocessor
+* ``pi``:               Strict directive
+
 FIX ("fix")
 -----------
 
 * ``attribute``:        attribute name
 * ``string``:           attribute value
+
+Gherkin ("gherkin")
+-------------------
+
+* ``keyword``:          keyword
+* ``number``:           number
+* ``comment``:          comment
+* ``string``:           string
+
+Nimrod ("nimrod")
+-----------------
+
+* ``decorator``         pragma
+* ``string``            string literal
+* ``type``              variable type
+* ``number``            numeric literal
+* ``comment``           comment
+
+Swift ("swift")
+-------------------------------
+
+* ``keyword``:          keyword
+* ``comment``:          comment
+* ``number``:           number
+* ``string``:           string
+* ``literal``:          special literal: "true", "false" and "nil"
+* ``built_in``:         built-in Swift functions
+* ``func``:             header of a function
+* ``class``:            class, protocol, enum, struct, or extension declaration
+* ``title``:            name of a function or class (or protocol, etc)
+* ``generics``:         generic type of a function
+* ``params``:           parameters of a function
+* ``type``:             a type
+* ``preprocessor``:     @attributes
diff --git a/docs/index.rst b/docs/index.rst
index 9a09ff7..7722448 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -16,9 +16,16 @@ Contents:
    reference
    css-classes-reference
    style-guide
-   contribution
    building-testing
 
+Contribution:
+
+.. toctree::
+   :maxdepth: 1
+
+   language-contribution
+   style-contribution
+
 Miscellaneous:
 
 .. toctree::
diff --git a/docs/contribution.rst b/docs/language-contribution.rst
similarity index 92%
rename from docs/contribution.rst
rename to docs/language-contribution.rst
index 401354f..81263a5 100644
--- a/docs/contribution.rst
+++ b/docs/language-contribution.rst
@@ -12,14 +12,13 @@ this is done during the build process and details differ for different build tar
 
   function(hljs) {
     return {
-      defaultMode: {
-        contains: [ ..., hljs.NUMBER_MODE, ... ]
-      }
+      keywords: 'foo bar',
+      contains: [ ..., hljs.NUMBER_MODE, ... ]
     }
   }
-  
+
 The name of the file is used as a short language identifier and should be usable as a class name in HTML and CSS.
-  
+
 
 2. Provide meta data
 --------------------
@@ -67,10 +66,11 @@ Class reference lives in the :doc:`CSS classes reference </css-classes-reference
 Describe shortly names of all meaningful modes used in your language definition.
 
 
-5. Add yourself to AUTHORS.*.txt
---------------------------------
+5. Add yourself to AUTHORS.*.txt and CHANGES.md
+-----------------------------------------------
 
 If you're a new contributor add yourself to the authors list. Feel free to use either English and/or Russian version.
+Also it will be good to update CHANGES.md.
 
 
 6. Create a pull request
diff --git a/docs/reference.rst b/docs/reference.rst
index 1f45063..a7cb639 100644
--- a/docs/reference.rst
+++ b/docs/reference.rst
@@ -100,7 +100,8 @@ Used instead of ``begin`` for modes starting with keywords to avoid needless rep
     beginKeywords: 'extends implements'
   }
 
-Unlike the ``[[#keywords]]`` attribute, this one allows only a simple list of space separated keywords. If you do need additional features of ``keywords`` or you just need more keywords for this mode you may include ``keywords`` along with ``beginKeywords``.
+Unlike the :ref:`keywords <keywords>` attribute, this one allows only a simple list of space separated keywords.
+If you do need additional features of ``keywords`` or you just need more keywords for this mode you may include ``keywords`` along with ``beginKeywords``.
 
 
 .. _endsWithParent:
@@ -140,7 +141,7 @@ lexemes
 
 **type**: regexp
 
-A regular expression that extracts individual lexemes from language text to find ``[[#keywords]]`` among them.
+A regular expression that extracts individual lexemes from language text to find :ref:`keywords <keywords>` among them.
 Default value is ``hljs.IDENT_RE`` which works for most languages.
 
 
@@ -156,7 +157,7 @@ Keyword definition comes in two forms:
 * ``'for while if else weird_voodoo|10 ... '`` -- a string of space-separated keywords with an optional relevance over a pipe
 * ``{'keyword': ' ... ', 'literal': ' ... '}`` -- an object whose keys are names of different kinds of keywords and values are keyword definition strings in the first form
 
-For detailed explanation see [[Language]] definition guide.
+For detailed explanation see :doc:`Language definition guide </language-guide>`.
 
 
 illegal
@@ -205,7 +206,7 @@ contains
 
 **type**: array
 
-The list of sub-modes that can be found inside the mode. For detailed explanation see [[Language]] definition guide.
+The list of sub-modes that can be found inside the mode. For detailed explanation see :doc:`Language definition guide </language-guide>`.
 
 
 starts
@@ -225,7 +226,7 @@ variants
 **type**: array
 
 Modification to the main definitions of the mode, effectively expanding it into several similar modes
-each having all the attributes from the main definition augmented or overriden by the variants::
+each having all the attributes from the main definition augmented or overridden by the variants::
 
   {
     className: 'string',
@@ -258,7 +259,7 @@ subLanguageMode
 
 **type**: identifier
 
-The only available value for this is ``'continuous'``. By default ``subLanguage`` highlights the contents of the mode as an isolated code snippet. In continuous mode every occurance of the mode is treated as a continuation of the previous one and highlighted from the point where it was interrupted before.
+The only available value for this is ``'continuous'``. By default ``subLanguage`` highlights the contents of the mode as an isolated code snippet. In continuous mode every occurrence of the mode is treated as a continuation of the previous one and highlighted from the point where it was interrupted before.
 
 This is best illustrated by an example. The following snippet consists of HTML markup intermixed with some templating language::
 
diff --git a/docs/style-contribution.rst b/docs/style-contribution.rst
new file mode 100644
index 0000000..829ac60
--- /dev/null
+++ b/docs/style-contribution.rst
@@ -0,0 +1,41 @@
+Style contributor checklist
+===========================
+
+1. Put style definition into a .css file
+----------------------------------------
+
+Please refer to :doc:`style guide </style-guide>` to make it consistent with other styles.
+
+
+2. Provide meta data
+--------------------
+
+Add some information about style to file header. There may be style name, original author and yours name and contacts.
+
+::
+
+  /*
+
+  Mean-and-clean style (c) John Smith <email at domain.com>
+  Ported by Jack Man
+
+  */
+
+
+3. Add it to test page
+----------------------
+
+Add your style to the top of src/test.html page, as for other styles.
+
+
+4. Add yourself to AUTHORS.*.txt and CHANGES.md
+-----------------------------------------------
+
+If you're a new contributor add yourself to the authors list. Feel free to use either English and/or Russian version.
+Also it will be good to update CHANGES.md.
+
+
+5. Create a pull request
+------------------------
+
+Send your contribution as a pull request on GitHub.
diff --git a/docs/style-guide.rst b/docs/style-guide.rst
index fede67b..b3092b2 100644
--- a/docs/style-guide.rst
+++ b/docs/style-guide.rst
@@ -104,3 +104,9 @@ A good idea is to include a comment at the top of your contributed CSS file that
   Mean-and-clean style (c) John Smith <email at domain.com>
   
   */
+
+
+Contributing
+------------
+
+Follow the :doc:`style contributor checklist </style-contribution>`.
diff --git a/src/export.html b/src/export.html
deleted file mode 100644
index a61babd..0000000
--- a/src/export.html
+++ /dev/null
@@ -1,87 +0,0 @@
-<!-- saved from url=(0013)about:internet -->
-<!-- ^^^ This is for IE not to show security warning for local files,
-see http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/sp2brows.mspx-->
-
-<!--
-Highlighted code export
-Copyright (c) Vladimir Gubarkov <xonixx at gmail.com>
--->
-
-<html>
-    <head>
-        <title>Highlited code export</title>
-        <link rel="stylesheet" href="styles/default.css">
-        <meta charset="utf-8">
-        <style type="text/css">
-            #t1, #t2 { width: 100%;}
-            tr { vertical-align: top; }
-            address { margin-top: 4em; }
-        </style>
-        <script src="../build/highlight.pack.js"></script>
-        <script>hljs.initHighlightingOnLoad();</script>
-    </head>
-    <body>
-        <script type="text/javascript">
-            String.prototype.escape = function() {
-                return this.replace(/&/gm, '&').replace(/</gm, '<').replace(/>/gm, '>');
-            }
-
-            function doIt() {
-                var viewDiv = document.getElementById("highlight-view");
-                var t1 = document.getElementById("t1");
-                var t2 = document.getElementById("t2");
-                var selector = document.getElementById("langSelector");
-                var selectedLang = selector.options[selector.selectedIndex].value.toLowerCase();
-                if(selectedLang) {
-                    viewDiv.innerHTML = '<pre><code class="'+selectedLang+'">'+t1.value.escape()+"</code></pre>";
-                } else { // try auto
-                    viewDiv.innerHTML = '<pre><code>' + t1.value.escape() + "</code></pre>";
-                }
-                hljs.highlightBlock(viewDiv.firstChild.firstChild);
-                t2.value = viewDiv.innerHTML;
-            }
-
-            function copyToBuffer(textToCopy) {
-                if (window.clipboardData) { // IE
-                    window.clipboardData.setData("Text", textToCopy);
-                } else if (window.netscape) { // FF
-                    // from http://developer.mozilla.org/en/docs/Using_the_Clipboard
-                    netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
-                    var gClipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"].getService(Components.interfaces.nsIClipboardHelper);
-                    gClipboardHelper.copyString(textToCopy);
-                }
-            }
-        </script>
-        <script type="text/javascript">
-            var langSelectorHtml = '<label>Language <select id="langSelector">';
-            langSelectorHtml += '<option value="">Auto</option>';
-            for (var i in hljs.LANGUAGES) {
-                if (hljs.LANGUAGES.hasOwnProperty(i))
-                    langSelectorHtml += '<option value=\"'+i+'\">'+i.charAt(0).toUpperCase()+i.substr(1)+'</option>';
-            }
-            langSelectorHtml += '</select></label>';
-            document.write(langSelectorHtml);
-        </script>
-        <table width="100%">
-            <tr>
-                <td><textarea rows="20" cols="50" id="t1"></textarea></td>
-                <td><textarea rows="20" cols="50" id="t2"></textarea></td>
-            </tr>
-            <tr>
-                <td>Write a code snippet</td>
-                <td>Get HTML to paste anywhere (for actual styles and colors see sample.css)</td>
-            </tr>
-        </table>
-        <table width="98%">
-            <tr>
-                <td><input type="button" value="Export →" onclick="doIt()"/></td>
-                <td align="right"><input type="button" value="Copy to buffer" onclick="copyToBuffer(document.getElementById('t2').value);"/></td>
-            </tr>
-        </table>
-        <div id="highlight-view"></div>
-        <address>
-          Export script: <a href="mailto:xonixx at gmail.com">Vladimir Gubarkov</a><br>
-          Highlighting: <a href="http://highlightjs.org/">highlight.js</a>
-        </address>
-    </body>
-</html>
diff --git a/src/highlight.js b/src/highlight.js
index 658720b..ce0f67b 100644
--- a/src/highlight.js
+++ b/src/highlight.js
@@ -20,21 +20,9 @@ function() {
     return match && match.index == 0;
   }
 
-  function blockText(block) {
-    return Array.prototype.map.call(block.childNodes, function(node) {
-      if (node.nodeType == 3) {
-        return options.useBR ? node.nodeValue.replace(/\n/g, '') : node.nodeValue;
-      }
-      if (tag(node) == 'br') {
-        return '\n';
-      }
-      return blockText(node);
-    }).join('');
-  }
-
   function blockLanguage(block) {
     var classes = (block.className + ' ' + (block.parentNode ? block.parentNode.className : '')).split(/\s+/);
-    classes = classes.map(function(c) {return c.replace(/^language-/, '');});
+    classes = classes.map(function(c) {return c.replace(/^lang(uage)?-/, '');});
     return classes.filter(function(c) {return getLanguage(c) || c == 'no-highlight';})[0];
   }
 
@@ -174,7 +162,7 @@ function() {
       if (mode.keywords) {
         var compiled_keywords = {};
 
-        function flatten(className, str) {
+        var flatten = function(className, str) {
           if (language.case_insensitive) {
             str = str.toLowerCase();
           }
@@ -182,7 +170,7 @@ function() {
             var pair = kw.split('|');
             compiled_keywords[pair[0]] = [className, pair[1] ? Number(pair[1]) : 1];
           });
-        }
+        };
 
         if (typeof mode.keywords == 'string') { // string
           flatten('keyword', mode.keywords);
@@ -197,7 +185,7 @@ function() {
 
       if (parent) {
         if (mode.beginKeywords) {
-          mode.begin = mode.beginKeywords.split(' ').join('|');
+          mode.begin = '\\b(' + mode.beginKeywords.split(' ').join('|') + ')\\b';
         }
         if (!mode.begin)
           mode.begin = /\B|\b/;
@@ -234,10 +222,9 @@ function() {
 
       var terminators =
         mode.contains.map(function(c) {
-          return c.beginKeywords ? '\\.?\\b(' + c.begin + ')\\b\\.?' : c.begin;
+          return c.beginKeywords ? '\\.?(' + c.begin + ')\\.?' : c.begin;
         })
-        .concat([mode.terminator_end])
-        .concat([mode.illegal])
+        .concat([mode.terminator_end, mode.illegal])
         .map(reStr)
         .filter(Boolean);
       mode.terminators = terminators.length ? langRe(terminators.join('|'), true) : {exec: function(s) {return null;}};
@@ -296,26 +283,25 @@ function() {
     }
 
     function processKeywords() {
-      var buffer = escape(mode_buffer);
       if (!top.keywords)
-        return buffer;
+        return escape(mode_buffer);
       var result = '';
       var last_index = 0;
       top.lexemesRe.lastIndex = 0;
-      var match = top.lexemesRe.exec(buffer);
+      var match = top.lexemesRe.exec(mode_buffer);
       while (match) {
-        result += buffer.substr(last_index, match.index - last_index);
+        result += escape(mode_buffer.substr(last_index, match.index - last_index));
         var keyword_match = keywordMatch(top, match);
         if (keyword_match) {
           relevance += keyword_match[1];
-          result += buildSpan(keyword_match[0], match[0]);
+          result += buildSpan(keyword_match[0], escape(match[0]));
         } else {
-          result += match[0];
+          result += escape(match[0]);
         }
         last_index = top.lexemesRe.lastIndex;
-        match = top.lexemesRe.exec(buffer);
+        match = top.lexemesRe.exec(mode_buffer);
       }
-      return result + buffer.substr(last_index);
+      return result + escape(mode_buffer.substr(last_index));
     }
 
     function processSubLanguage() {
@@ -416,7 +402,7 @@ function() {
     var result = '';
     for(var current = top; current != language; current = current.parent) {
       if (current.className) {
-        result = buildSpan(current.className, result, true);
+        result += buildSpan(current.className, result, true);
       }
     }
     var mode_buffer = '';
@@ -517,7 +503,9 @@ function() {
   two optional parameters for fixMarkup.
   */
   function highlightBlock(block) {
-    var text = blockText(block);
+    var text = options.useBR ? block.innerHTML
+      .replace(/\n/g,'').replace(/<br>|<br [^>]*>/g, '\n').replace(/<[^>]*>/g,'')
+      : block.textContent;
     var language = blockLanguage(block);
     if (language == 'no-highlight')
         return;
@@ -588,6 +576,10 @@ function() {
     }
   }
 
+  function listLanguages() {
+    return Object.keys(languages);
+  }
+
   function getLanguage(name) {
     return languages[name] || languages[aliases[name]];
   }
@@ -602,6 +594,7 @@ function() {
   this.initHighlighting = initHighlighting;
   this.initHighlightingOnLoad = initHighlightingOnLoad;
   this.registerLanguage = registerLanguage;
+  this.listLanguages = listLanguages;
   this.getLanguage = getLanguage;
   this.inherit = inherit;
 
@@ -629,17 +622,23 @@ function() {
     illegal: '\\n',
     contains: [this.BACKSLASH_ESCAPE]
   };
+  this.PHRASAL_WORDS_MODE = {
+    begin: /\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such)\b/
+  };
   this.C_LINE_COMMENT_MODE = {
     className: 'comment',
-    begin: '//', end: '$'
+    begin: '//', end: '$',
+    contains: [this.PHRASAL_WORDS_MODE]
   };
   this.C_BLOCK_COMMENT_MODE = {
     className: 'comment',
-    begin: '/\\*', end: '\\*/'
+    begin: '/\\*', end: '\\*/',
+    contains: [this.PHRASAL_WORDS_MODE]
   };
   this.HASH_COMMENT_MODE = {
     className: 'comment',
-    begin: '#', end: '$'
+    begin: '#', end: '$',
+    contains: [this.PHRASAL_WORDS_MODE]
   };
   this.NUMBER_MODE = {
     className: 'number',
@@ -656,6 +655,19 @@ function() {
     begin: this.BINARY_NUMBER_RE,
     relevance: 0
   };
+  this.CSS_NUMBER_MODE = {
+    className: 'number',
+    begin: this.NUMBER_RE + '(' +
+      '%|em|ex|ch|rem'  +
+      '|vw|vh|vmin|vmax' +
+      '|cm|mm|in|pt|pc|px' +
+      '|deg|grad|rad|turn' +
+      '|s|ms' +
+      '|Hz|kHz' +
+      '|dpi|dpcm|dppx' +
+      ')?',
+    relevance: 0
+  };
   this.REGEXP_MODE = {
     className: 'regexp',
     begin: /\//, end: /\/[gim]*/,
diff --git a/src/languages/actionscript.js b/src/languages/actionscript.js
index 82b082c..64b8df9 100644
--- a/src/languages/actionscript.js
+++ b/src/languages/actionscript.js
@@ -14,6 +14,7 @@ function(hljs) {
   };
 
   return {
+    aliases: ['as'],
     keywords: {
       keyword: 'as break case catch class const continue default delete do dynamic each ' +
         'else extends final finally for function get if implements import in include ' +
@@ -35,7 +36,7 @@ function(hljs) {
       },
       {
         className: 'class',
-        beginKeywords: 'class interface', end: '{',
+        beginKeywords: 'class interface', end: '{', excludeEnd: true,
         contains: [
           {
             beginKeywords: 'extends implements'
@@ -49,7 +50,7 @@ function(hljs) {
       },
       {
         className: 'function',
-        beginKeywords: 'function', end: '[{;]',
+        beginKeywords: 'function', end: '[{;]', excludeEnd: true,
         illegal: '\\S',
         contains: [
           hljs.TITLE_MODE,
diff --git a/src/languages/apache.js b/src/languages/apache.js
index 38de0e6..042f1ba 100644
--- a/src/languages/apache.js
+++ b/src/languages/apache.js
@@ -9,6 +9,7 @@ Description: language definition for Apache configuration files (httpd.conf & .h
 function(hljs) {
   var NUMBER = {className: 'number', begin: '[\\$%]\\d+'};
   return {
+    aliases: ['apacheconf'],
     case_insensitive: true,
     contains: [
       hljs.HASH_COMMENT_MODE,
diff --git a/src/languages/applescript.js b/src/languages/applescript.js
index 5607c46..13d83ff 100644
--- a/src/languages/applescript.js
+++ b/src/languages/applescript.js
@@ -14,7 +14,7 @@ function(hljs) {
   var COMMENTS = [
     {
       className: 'comment',
-      begin: '--', end: '$',
+      begin: '--', end: '$'
     },
     {
       className: 'comment',
@@ -25,6 +25,7 @@ function(hljs) {
   ];
 
   return {
+    aliases: ['osascript'],
     keywords: {
       keyword:
         'about above after against and around as at back before beginning ' +
@@ -34,7 +35,7 @@ function(hljs) {
         'get given global if ignoring in into is it its last local me ' +
         'middle mod my ninth not of on onto or over prop property put ref ' +
         'reference repeat returning script second set seventh since ' +
-        'sixth some tell tenth that the then third through thru ' +
+        'sixth some tell tenth that the|0 then third through thru ' +
         'timeout times to transaction try until where while whose with ' +
         'without',
       constant:
diff --git a/src/languages/avrasm.js b/src/languages/avrasm.js
index 50b9df0..0da9529 100644
--- a/src/languages/avrasm.js
+++ b/src/languages/avrasm.js
@@ -6,6 +6,7 @@ Author: Vladimir Ermakov <vooon341 at gmail.com>
 function(hljs) {
   return {
     case_insensitive: true,
+    lexemes: '\\.?' + hljs.IDENT_RE,
     keywords: {
       keyword:
         /* mnemonic */
@@ -28,7 +29,10 @@ function(hljs) {
         'tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ' +
         'ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr ' +
         'porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ' +
-        'ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf'
+        'ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf',
+      preprocessor:
+        '.byte .cseg .db .def .device .dseg .dw .endmacro .equ .eseg .exit .include .list ' +
+        '.listmac .macro .nolist .org .set'
     },
     contains: [
       hljs.C_BLOCK_COMMENT_MODE,
@@ -47,10 +51,6 @@ function(hljs) {
       },
       {className: 'label',  begin: '^[A-Za-z0-9_.$]+:'},
       {className: 'preprocessor', begin: '#', end: '$'},
-      {  // директивы «.include» «.macro» и т.д.
-        className: 'preprocessor',
-        begin: '\\.[a-zA-Z]+'
-      },
       {  // подстановка в «.macro»
         className: 'localvars',
         begin: '@[0-9]+'
diff --git a/src/languages/axapta.js b/src/languages/axapta.js
index cc09e8c..832e9d9 100644
--- a/src/languages/axapta.js
+++ b/src/languages/axapta.js
@@ -23,7 +23,7 @@ function(hljs) {
       },
       {
         className: 'class',
-        beginKeywords: 'class interface', end: '{',
+        beginKeywords: 'class interface', end: '{', excludeEnd: true,
         illegal: ':',
         contains: [
           {
diff --git a/src/languages/bash.js b/src/languages/bash.js
index 73e4ab8..b68efbe 100644
--- a/src/languages/bash.js
+++ b/src/languages/bash.js
@@ -31,6 +31,7 @@ function(hljs) {
   };
 
   return {
+    aliases: ['sh', 'zsh'],
     lexemes: /-?[a-z\.]+/,
     keywords: {
       keyword:
diff --git a/src/languages/brainfuck.js b/src/languages/brainfuck.js
index 0bafd44..0154996 100644
--- a/src/languages/brainfuck.js
+++ b/src/languages/brainfuck.js
@@ -10,6 +10,7 @@ function(hljs){
     relevance: 0
   };
   return {
+    aliases: ['bf'],
     contains: [
       {
         className: 'comment',
diff --git a/src/languages/capnproto.js b/src/languages/capnproto.js
new file mode 100644
index 0000000..3559f70
--- /dev/null
+++ b/src/languages/capnproto.js
@@ -0,0 +1,54 @@
+/*
+Language: Cap’n Proto
+Author: Oleg Efimov <efimovov at gmail.com>
+Description: Cap’n Proto message definition format
+*/
+
+function(hljs) {
+  return {
+    aliases: ['capnp'],
+    keywords: {
+      keyword:
+        'struct enum interface union group import using const annotation extends in of on as with from fixed',
+      built_in:
+        'Void Bool Int8 Int16 Int32 Int64 UInt8 UInt16 UInt32 UInt64 Float32 Float64 ' +
+        'Text Data AnyPointer AnyStruct Capability List',
+      literal:
+        'true false'
+    },
+    contains: [
+      hljs.QUOTE_STRING_MODE,
+      hljs.NUMBER_MODE,
+      hljs.HASH_COMMENT_MODE,
+      {
+        className: 'shebang',
+        begin: /@0x[\w\d]{16};/,
+        illegal: /\n/
+      },
+      {
+        className: 'number',
+        begin: /@\d+\b/
+      },
+      {
+        className: 'class',
+        beginKeywords: 'struct enum', end: /\{/,
+        illegal: /\n/,
+        contains: [
+          hljs.inherit(hljs.TITLE_MODE, {
+            starts: {endsWithParent: true, excludeEnd: true} // hack: eating everything after the first title
+          })
+        ]
+      },
+      {
+        className: 'class',
+        beginKeywords: 'interface', end: /\{/,
+        illegal: /\n/,
+        contains: [
+          hljs.inherit(hljs.TITLE_MODE, {
+            starts: {endsWithParent: true, excludeEnd: true} // hack: eating everything after the first title
+          })
+        ]
+      }
+    ]
+  };
+}
diff --git a/src/languages/clojure.js b/src/languages/clojure.js
index 2d080f7..5d9dd69 100644
--- a/src/languages/clojure.js
+++ b/src/languages/clojure.js
@@ -88,6 +88,7 @@ function(hljs) {
   COLLECTION.contains = [LIST, STRING, HINT, COMMENT, KEY, COLLECTION, NUMBER];
 
   return {
+    aliases: ['clj'],
     illegal: /\S/,
     contains: [
       COMMENT,
diff --git a/src/languages/cmake.js b/src/languages/cmake.js
index 4a11054..86d745d 100644
--- a/src/languages/cmake.js
+++ b/src/languages/cmake.js
@@ -7,6 +7,7 @@ Website: http://kalnitsky.org/
 
 function(hljs) {
   return {
+    aliases: ['cmake.in'],
     case_insensitive: true,
     keywords: {
       keyword:
diff --git a/src/languages/coffeescript.js b/src/languages/coffeescript.js
index 45addba..dfa9fde 100644
--- a/src/languages/coffeescript.js
+++ b/src/languages/coffeescript.js
@@ -22,7 +22,7 @@ function(hljs) {
       'case default function var void with const let enum export import native ' +
       '__hasProp __extends __slice __bind __indexOf',
     built_in:
-      'npm require console print module exports global window document'
+      'npm require console print module global window document'
   };
   var JS_IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';
   var TITLE = hljs.inherit(hljs.TITLE_MODE, {begin: JS_IDENT_RE});
@@ -84,6 +84,7 @@ function(hljs) {
   SUBST.contains = EXPRESSIONS;
 
   return {
+    aliases: ['coffee', 'cson', 'iced'],
     keywords: KEYWORDS,
     contains: EXPRESSIONS.concat([
       {
diff --git a/src/languages/cpp.js b/src/languages/cpp.js
index 8ccd8b6..5dd2f50 100644
--- a/src/languages/cpp.js
+++ b/src/languages/cpp.js
@@ -24,7 +24,7 @@ function(hljs) {
       'vfprintf vprintf vsprintf'
   };
   return {
-    aliases: ['c'],
+    aliases: ['c', 'h', 'c++', 'h++'],
     keywords: CPP_KEYWORDS,
     illegal: '</',
     contains: [
@@ -44,8 +44,13 @@ function(hljs) {
       {
         className: 'preprocessor',
         begin: '#', end: '$',
+        keywords: 'if else elif endif define undef warning error line pragma',
         contains: [
-          {begin: 'include\\s*<', end: '>', illegal: '\\n'},
+          {
+            begin: 'include\\s*[<"]', end: '[>"]',
+            keywords: 'include',
+            illegal: '\\n'
+          },
           hljs.C_LINE_COMMENT_MODE
         ]
       },
@@ -53,8 +58,10 @@ function(hljs) {
         className: 'stl_container',
         begin: '\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<', end: '>',
         keywords: CPP_KEYWORDS,
-        relevance: 10,
         contains: ['self']
+      },
+      {
+        begin: hljs.IDENT_RE + '::'
       }
     ]
   };
diff --git a/src/languages/cs.js b/src/languages/cs.js
index 6ef82db..391f9ed 100644
--- a/src/languages/cs.js
+++ b/src/languages/cs.js
@@ -16,7 +16,9 @@ function(hljs) {
     'ascending descending from get group into join let orderby partial select set value var ' +
     'where yield';
   return {
+    aliases: ['csharp'],
     keywords: KEYWORDS,
+    illegal: /::/,
     contains: [
       {
         className: 'comment',
@@ -24,11 +26,17 @@ function(hljs) {
         contains: [
           {
             className: 'xmlDocTag',
-            begin: '///|<!--|-->'
-          },
-          {
-            className: 'xmlDocTag',
-            begin: '</?', end: '>'
+            variants: [
+              {
+                begin: '///', relevance: 0
+              },
+              {
+                begin: '<!--|-->'
+              },
+              {
+                begin: '</?', end: '>'
+              }
+            ]
           }
         ]
       },
diff --git a/src/languages/css.js b/src/languages/css.js
index 22c5326..6a63fb0 100644
--- a/src/languages/css.js
+++ b/src/languages/css.js
@@ -6,8 +6,10 @@ function(hljs) {
   var IDENT_RE = '[a-zA-Z-][a-zA-Z0-9_-]*';
   var FUNCTION = {
     className: 'function',
-    begin: IDENT_RE + '\\(', end: '\\)',
-    contains: ['self', hljs.NUMBER_MODE, hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE]
+    begin: IDENT_RE + '\\(', 
+    returnBegin: true,
+    excludeEnd: true,
+    end: '\\('
   };
   return {
     case_insensitive: true,
@@ -53,7 +55,7 @@ function(hljs) {
             contains: [
               FUNCTION,
               hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE,
-              hljs.NUMBER_MODE
+              hljs.CSS_NUMBER_MODE
             ]
           }
         ]
@@ -83,7 +85,7 @@ function(hljs) {
                   endsWithParent: true, excludeEnd: true,
                   contains: [
                     FUNCTION,
-                    hljs.NUMBER_MODE,
+                    hljs.CSS_NUMBER_MODE,
                     hljs.QUOTE_STRING_MODE,
                     hljs.APOS_STRING_MODE,
                     hljs.C_BLOCK_COMMENT_MODE,
diff --git a/src/languages/d.js b/src/languages/d.js
index 45abef6..7cc3eb5 100644
--- a/src/languages/d.js
+++ b/src/languages/d.js
@@ -23,244 +23,242 @@ Date: 2012-04-08
  */
 
 function(hljs) {
+  /**
+   * Language keywords
+   *
+   * @type {Object}
+   */
+  var D_KEYWORDS = {
+    keyword:
+      'abstract alias align asm assert auto body break byte case cast catch class ' +
+      'const continue debug default delete deprecated do else enum export extern final ' +
+      'finally for foreach foreach_reverse|10 goto if immutable import in inout int ' +
+      'interface invariant is lazy macro mixin module new nothrow out override package ' +
+      'pragma private protected public pure ref return scope shared static struct ' +
+      'super switch synchronized template this throw try typedef typeid typeof union ' +
+      'unittest version void volatile while with __FILE__ __LINE__ __gshared|10 ' +
+      '__thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__',
+    built_in:
+      'bool cdouble cent cfloat char creal dchar delegate double dstring float function ' +
+      'idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar ' +
+      'wstring',
+    literal:
+      'false null true'
+  };
 
-	/**
-	 * Language keywords
-	 *
-	 * @type {Object}
-	 */
-	var D_KEYWORDS = {
-		keyword:
-			'abstract alias align asm assert auto body break byte case cast catch class ' +
-			'const continue debug default delete deprecated do else enum export extern final ' +
-			'finally for foreach foreach_reverse|10 goto if immutable import in inout int ' +
-			'interface invariant is lazy macro mixin module new nothrow out override package ' +
-			'pragma private protected public pure ref return scope shared static struct ' +
-			'super switch synchronized template this throw try typedef typeid typeof union ' +
-			'unittest version void volatile while with __FILE__ __LINE__ __gshared|10 ' +
-			'__thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__',
-		built_in:
-			'bool cdouble cent cfloat char creal dchar delegate double dstring float function ' +
-			'idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar ' +
-			'wstring',
-		literal:
-			'false null true'
-	};
+  /**
+   * Number literal regexps
+   *
+   * @type {String}
+   */
+  var decimal_integer_re = '(0|[1-9][\\d_]*)',
+    decimal_integer_nosus_re = '(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)',
+    binary_integer_re = '0[bB][01_]+',
+    hexadecimal_digits_re = '([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)',
+    hexadecimal_integer_re = '0[xX]' + hexadecimal_digits_re,
 
-	/**
-	 * Number literal regexps
-	 *
-	 * @type {String}
-	 */
-	var decimal_integer_re = '(0|[1-9][\\d_]*)',
-		decimal_integer_nosus_re = '(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)',
-		binary_integer_re = '0[bB][01_]+',
-		hexadecimal_digits_re = '([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)',
-		hexadecimal_integer_re = '0[xX]' + hexadecimal_digits_re,
+    decimal_exponent_re = '([eE][+-]?' + decimal_integer_nosus_re + ')',
+    decimal_float_re = '(' + decimal_integer_nosus_re + '(\\.\\d*|' + decimal_exponent_re + ')|' +
+                '\\d+\\.' + decimal_integer_nosus_re + decimal_integer_nosus_re + '|' +
+                '\\.' + decimal_integer_re + decimal_exponent_re + '?' +
+              ')',
+    hexadecimal_float_re = '(0[xX](' +
+                  hexadecimal_digits_re + '\\.' + hexadecimal_digits_re + '|'+
+                  '\\.?' + hexadecimal_digits_re +
+                 ')[pP][+-]?' + decimal_integer_nosus_re + ')',
 
-		decimal_exponent_re = '([eE][+-]?' + decimal_integer_nosus_re + ')',
-		decimal_float_re = '(' + decimal_integer_nosus_re + '(\\.\\d*|' + decimal_exponent_re + ')|' +
-								'\\d+\\.' + decimal_integer_nosus_re + decimal_integer_nosus_re + '|' +
-								'\\.' + decimal_integer_re + decimal_exponent_re + '?' +
-							')',
-		hexadecimal_float_re = '(0[xX](' +
-									hexadecimal_digits_re + '\\.' + hexadecimal_digits_re + '|'+
-									'\\.?' + hexadecimal_digits_re +
-							   ')[pP][+-]?' + decimal_integer_nosus_re + ')',
+    integer_re = '(' +
+      decimal_integer_re + '|' +
+      binary_integer_re  + '|' +
+       hexadecimal_integer_re   +
+    ')',
 
-		integer_re = '(' +
-			decimal_integer_re + '|' +
-			binary_integer_re  + '|' +
-		 	hexadecimal_integer_re   +
-		')',
+    float_re = '(' +
+      hexadecimal_float_re + '|' +
+      decimal_float_re  +
+    ')';
 
-		float_re = '(' +
-			hexadecimal_float_re + '|' +
-			decimal_float_re  +
-		')';
+  /**
+   * Escape sequence supported in D string and character literals
+   *
+   * @type {String}
+   */
+  var escape_sequence_re = '\\\\(' +
+              '[\'"\\?\\\\abfnrtv]|' +  // common escapes
+              'u[\\dA-Fa-f]{4}|' +     // four hex digit unicode codepoint
+              '[0-7]{1,3}|' +       // one to three octal digit ascii char code
+              'x[\\dA-Fa-f]{2}|' +    // two hex digit ascii char code
+              'U[\\dA-Fa-f]{8}' +      // eight hex digit unicode codepoint
+              ')|' +
+              '&[a-zA-Z\\d]{2,};';      // named character entity
 
-	/**
-	 * Escape sequence supported in D string and character literals
-	 *
-	 * @type {String}
-	 */
-	var escape_sequence_re = '\\\\(' +
-							'[\'"\\?\\\\abfnrtv]|' +	// common escapes
-							'u[\\dA-Fa-f]{4}|' + 		// four hex digit unicode codepoint
-							'[0-7]{1,3}|' + 			// one to three octal digit ascii char code
-							'x[\\dA-Fa-f]{2}|' +		// two hex digit ascii char code
-							'U[\\dA-Fa-f]{8}' +			// eight hex digit unicode codepoint
-						  ')|' +
-						  '&[a-zA-Z\\d]{2,};';			// named character entity
+  /**
+   * D integer number literals
+   *
+   * @type {Object}
+   */
+  var D_INTEGER_MODE = {
+    className: 'number',
+      begin: '\\b' + integer_re + '(L|u|U|Lu|LU|uL|UL)?',
+      relevance: 0
+  };
 
+  /**
+   * [D_FLOAT_MODE description]
+   * @type {Object}
+   */
+  var D_FLOAT_MODE = {
+    className: 'number',
+    begin: '\\b(' +
+        float_re + '([fF]|L|i|[fF]i|Li)?|' +
+        integer_re + '(i|[fF]i|Li)' +
+      ')',
+    relevance: 0
+  };
 
-	/**
-	 * D integer number literals
-	 *
-	 * @type {Object}
-	 */
-	var D_INTEGER_MODE = {
-		className: 'number',
-    	begin: '\\b' + integer_re + '(L|u|U|Lu|LU|uL|UL)?',
-    	relevance: 0
-	};
+  /**
+   * D character literal
+   *
+   * @type {Object}
+   */
+  var D_CHARACTER_MODE = {
+    className: 'string',
+    begin: '\'(' + escape_sequence_re + '|.)', end: '\'',
+    illegal: '.'
+  };
 
-	/**
-	 * [D_FLOAT_MODE description]
-	 * @type {Object}
-	 */
-	var D_FLOAT_MODE = {
-		className: 'number',
-		begin: '\\b(' +
-				float_re + '([fF]|L|i|[fF]i|Li)?|' +
-				integer_re + '(i|[fF]i|Li)' +
-			')',
-		relevance: 0
-	};
+  /**
+   * D string escape sequence
+   *
+   * @type {Object}
+   */
+  var D_ESCAPE_SEQUENCE = {
+    begin: escape_sequence_re,
+    relevance: 0
+  };
 
-	/**
-	 * D character literal
-	 *
-	 * @type {Object}
-	 */
-	var D_CHARACTER_MODE = {
-		className: 'string',
-		begin: '\'(' + escape_sequence_re + '|.)', end: '\'',
-		illegal: '.'
-	};
+  /**
+   * D double quoted string literal
+   *
+   * @type {Object}
+   */
+  var D_STRING_MODE = {
+    className: 'string',
+    begin: '"',
+    contains: [D_ESCAPE_SEQUENCE],
+    end: '"[cwd]?'
+  };
 
-	/**
-	 * D string escape sequence
-	 *
-	 * @type {Object}
-	 */
-	var D_ESCAPE_SEQUENCE = {
-		begin: escape_sequence_re,
-		relevance: 0
-	}
+  /**
+   * D wysiwyg and delimited string literals
+   *
+   * @type {Object}
+   */
+  var D_WYSIWYG_DELIMITED_STRING_MODE = {
+    className: 'string',
+    begin: '[rq]"',
+    end: '"[cwd]?',
+    relevance: 5
+  };
 
-	/**
-	 * D double quoted string literal
-	 *
-	 * @type {Object}
-	 */
-	var D_STRING_MODE = {
-		className: 'string',
-		begin: '"',
-		contains: [D_ESCAPE_SEQUENCE],
-		end: '"[cwd]?'
-	};
+  /**
+   * D alternate wysiwyg string literal
+   *
+   * @type {Object}
+   */
+  var D_ALTERNATE_WYSIWYG_STRING_MODE = {
+    className: 'string',
+    begin: '`',
+    end: '`[cwd]?'
+  };
 
-	/**
-	 * D wysiwyg and delimited string literals
-	 *
-	 * @type {Object}
-	 */
-	var D_WYSIWYG_DELIMITED_STRING_MODE = {
-		className: 'string',
-		begin: '[rq]"',
-		end: '"[cwd]?',
-		relevance: 5
-	};
+  /**
+   * D hexadecimal string literal
+   *
+   * @type {Object}
+   */
+  var D_HEX_STRING_MODE = {
+    className: 'string',
+    begin: 'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',
+    relevance: 10
+  };
 
-	/**
-	 * D alternate wysiwyg string literal
-	 *
-	 * @type {Object}
-	 */
-	var D_ALTERNATE_WYSIWYG_STRING_MODE = {
-		className: 'string',
-		begin: '`',
-		end: '`[cwd]?'
-	};
+  /**
+   * D delimited string literal
+   *
+   * @type {Object}
+   */
+  var D_TOKEN_STRING_MODE = {
+    className: 'string',
+    begin: 'q"\\{',
+    end: '\\}"'
+  };
 
-	/**
-	 * D hexadecimal string literal
-	 *
-	 * @type {Object}
-	 */
-	var D_HEX_STRING_MODE = {
-		className: 'string',
-		begin: 'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',
-		relevance: 10
-	};
+  /**
+   * Hashbang support
+   *
+   * @type {Object}
+   */
+  var D_HASHBANG_MODE = {
+    className: 'shebang',
+    begin: '^#!',
+    end: '$',
+    relevance: 5
+  };
 
-	/**
-	 * D delimited string literal
-	 *
-	 * @type {Object}
-	 */
-	var D_TOKEN_STRING_MODE = {
-		className: 'string',
-		begin: 'q"\\{',
-		end: '\\}"'
-	};
+  /**
+   * D special token sequence
+   *
+   * @type {Object}
+   */
+  var D_SPECIAL_TOKEN_SEQUENCE_MODE = {
+    className: 'preprocessor',
+    begin: '#(line)',
+    end: '$',
+    relevance: 5
+  };
 
-	/**
-	 * Hashbang support
-	 *
-	 * @type {Object}
-	 */
-	var D_HASHBANG_MODE = {
-		className: 'shebang',
-		begin: '^#!',
-		end: '$',
-		relevance: 5
-	};
+  /**
+   * D attributes
+   *
+   * @type {Object}
+   */
+  var D_ATTRIBUTE_MODE = {
+    className: 'keyword',
+    begin: '@[a-zA-Z_][a-zA-Z_\\d]*'
+  };
 
-	/**
-	 * D special token sequence
-	 *
-	 * @type {Object}
-	 */
-	var D_SPECIAL_TOKEN_SEQUENCE_MODE = {
-		className: 'preprocessor',
-		begin: '#(line)',
-		end: '$',
-		relevance: 5
-	};
+  /**
+   * D nesting comment
+   *
+   * @type {Object}
+   */
+  var D_NESTING_COMMENT_MODE = {
+    className: 'comment',
+    begin: '\\/\\+',
+    contains: ['self'],
+    end: '\\+\\/',
+    relevance: 10
+  };
 
-	/**
-	 * D attributes
-	 *
-	 * @type {Object}
-	 */
-	var D_ATTRIBUTE_MODE = {
-		className: 'keyword',
-		begin: '@[a-zA-Z_][a-zA-Z_\\d]*'
-	};
-
-	/**
-	 * D nesting comment
-	 *
-	 * @type {Object}
-	 */
-	var D_NESTING_COMMENT_MODE = {
-		className: 'comment',
-		begin: '\\/\\+',
-		contains: ['self'],
-		end: '\\+\\/',
-		relevance: 10
-	}
-
-	return {
-		lexemes: hljs.UNDERSCORE_IDENT_RE,
-		keywords: D_KEYWORDS,
-		contains: [
-			hljs.C_LINE_COMMENT_MODE,
-  			hljs.C_BLOCK_COMMENT_MODE,
-  			D_NESTING_COMMENT_MODE,
-  			D_HEX_STRING_MODE,
-  			D_STRING_MODE,
-  			D_WYSIWYG_DELIMITED_STRING_MODE,
-  			D_ALTERNATE_WYSIWYG_STRING_MODE,
-  			D_TOKEN_STRING_MODE,
-  			D_FLOAT_MODE,
-  			D_INTEGER_MODE,
-  			D_CHARACTER_MODE,
-  			D_HASHBANG_MODE,
-  			D_SPECIAL_TOKEN_SEQUENCE_MODE,
-  			D_ATTRIBUTE_MODE
-		]
-	};
+  return {
+    lexemes: hljs.UNDERSCORE_IDENT_RE,
+    keywords: D_KEYWORDS,
+    contains: [
+      hljs.C_LINE_COMMENT_MODE,
+        hljs.C_BLOCK_COMMENT_MODE,
+        D_NESTING_COMMENT_MODE,
+        D_HEX_STRING_MODE,
+        D_STRING_MODE,
+        D_WYSIWYG_DELIMITED_STRING_MODE,
+        D_ALTERNATE_WYSIWYG_STRING_MODE,
+        D_TOKEN_STRING_MODE,
+        D_FLOAT_MODE,
+        D_INTEGER_MODE,
+        D_CHARACTER_MODE,
+        D_HASHBANG_MODE,
+        D_SPECIAL_TOKEN_SEQUENCE_MODE,
+        D_ATTRIBUTE_MODE
+    ]
+  };
 }
diff --git a/src/languages/diff.js b/src/languages/diff.js
index 6b1eecf..c56206b 100644
--- a/src/languages/diff.js
+++ b/src/languages/diff.js
@@ -6,6 +6,7 @@ Author: Vasily Polovnyov <vast at whiteants.net>
 
 function(hljs) {
   return {
+    aliases: ['patch'],
     contains: [
       {
         className: 'chunk',
diff --git a/src/languages/django.js b/src/languages/django.js
index d571fb6..0ec5038 100644
--- a/src/languages/django.js
+++ b/src/languages/django.js
@@ -25,6 +25,7 @@ function(hljs) {
   };
 
   return {
+    aliases: ['jinja'],
     case_insensitive: true,
     subLanguage: 'xml', subLanguageMode: 'continuous',
     contains: [
diff --git a/src/languages/dos.js b/src/languages/dos.js
index bccfdd6..924e5dd 100644
--- a/src/languages/dos.js
+++ b/src/languages/dos.js
@@ -5,6 +5,7 @@ Author: Alexander Makarov (http://rmcreative.ru/)
 
 function(hljs) {
   return {
+    aliases: ['bat', 'cmd'],
     case_insensitive: true,
     keywords: {
       flow: 'if else goto for in do call exit not exist errorlevel defined equ neq lss leq gtr geq',
diff --git a/src/languages/elixir.js b/src/languages/elixir.js
new file mode 100644
index 0000000..02d03b1
--- /dev/null
+++ b/src/languages/elixir.js
@@ -0,0 +1,114 @@
+/*
+Language: Elixir
+Author: Josh Adams <josh at isotope11.com>
+Description: language definition for Elixir source code files (.ex and .exs).  Based on ruby language support.
+*/
+
+function(hljs) {
+  var ELIXIR_IDENT_RE = '[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?';
+  var ELIXIR_METHOD_RE = '[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?';
+  var ELIXIR_KEYWORDS =
+    'and false then defined module in return redo retry end for true self when ' +
+    'next until do begin unless nil break not case cond alias while ensure or ' +
+    'include use alias fn quote';
+  var SUBST = {
+    className: 'subst',
+    begin: '#\\{', end: '}',
+    lexemes: ELIXIR_IDENT_RE,
+    keywords: ELIXIR_KEYWORDS
+  };
+  var STRING = {
+    className: 'string',
+    contains: [hljs.BACKSLASH_ESCAPE, SUBST],
+    variants: [
+      {
+        begin: /'/, end: /'/
+      },
+      {
+        begin: /"/, end: /"/
+      }
+    ]
+  };
+  var PARAMS = {
+    endsWithParent: true, returnEnd: true,
+    lexemes: ELIXIR_IDENT_RE,
+    keywords: ELIXIR_KEYWORDS,
+    relevance: 0
+  };
+  var FUNCTION = {
+    className: 'function',
+    beginKeywords: 'def defmacro', end: /\bdo\b/,
+    contains: [
+      hljs.inherit(hljs.TITLE_MODE, {
+        begin: ELIXIR_METHOD_RE,
+        starts: PARAMS
+      })
+    ]
+  };
+  var CLASS = hljs.inherit(FUNCTION, {
+    className: 'class',
+    beginKeywords: 'defmodule defrecord', end: /\bdo\b|$|;/
+  })
+  var ELIXIR_DEFAULT_CONTAINS = [
+    STRING,
+    hljs.HASH_COMMENT_MODE,
+    CLASS,
+    FUNCTION,
+    {
+      className: 'constant',
+      begin: '(\\b[A-Z_]\\w*(.)?)+',
+      relevance: 0
+    },
+    {
+      className: 'symbol',
+      begin: ':',
+      contains: [STRING, {begin: ELIXIR_METHOD_RE}],
+      relevance: 0
+    },
+    {
+      className: 'symbol',
+      begin: ELIXIR_IDENT_RE + ':',
+      relevance: 0
+    },
+    {
+      className: 'number',
+      begin: '(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b',
+      relevance: 0
+    },
+    {
+      className: 'variable',
+      begin: '(\\$\\W)|((\\$|\\@\\@?)(\\w+))'
+    },
+    {
+      begin: '->'
+    },
+    { // regexp container
+      begin: '(' + hljs.RE_STARTERS_RE + ')\\s*',
+      contains: [
+        hljs.HASH_COMMENT_MODE,
+        {
+          className: 'regexp',
+          illegal: '\\n',
+          contains: [hljs.BACKSLASH_ESCAPE, SUBST],
+          variants: [
+            {
+              begin: '/', end: '/[a-z]*'
+            },
+            {
+              begin: '%r\\[', end: '\\][a-z]*'
+            }
+          ]
+        }
+      ],
+      relevance: 0
+    }
+  ];
+  SUBST.contains = ELIXIR_DEFAULT_CONTAINS;
+  PARAMS.contains = ELIXIR_DEFAULT_CONTAINS;
+
+  return {
+    lexemes: ELIXIR_IDENT_RE,
+    keywords: ELIXIR_KEYWORDS,
+    contains: ELIXIR_DEFAULT_CONTAINS
+  };
+}
diff --git a/src/languages/erlang.js b/src/languages/erlang.js
index caa18c4..05da495 100644
--- a/src/languages/erlang.js
+++ b/src/languages/erlang.js
@@ -17,8 +17,7 @@ function(hljs) {
 
   var COMMENT = {
     className: 'comment',
-    begin: '%', end: '$',
-    relevance: 0
+    begin: '%', end: '$'
   };
   var NUMBER = {
     className: 'number',
@@ -117,8 +116,9 @@ function(hljs) {
     contains: BASIC_MODES
   };
   return {
+    aliases: ['erl'],
     keywords: ERLANG_RESERVED,
-    illegal: '(</|\\*=|\\+=|-=|/=|/\\*|\\*/|\\(\\*|\\*\\))',
+    illegal: '(</|\\*=|\\+=|-=|/\\*|\\*/|\\(\\*|\\*\\))',
     contains: [
       {
         className: 'function',
@@ -146,14 +146,15 @@ function(hljs) {
         keywords:
           '-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn ' +
           '-import -include -include_lib -compile -define -else -endif -file -behaviour ' +
-          '-behavior',
+          '-behavior -spec',
         contains: [PARAMS]
       },
       NUMBER,
       hljs.QUOTE_STRING_MODE,
       RECORD_ACCESS,
       VAR1, VAR2,
-      TUPLE
+      TUPLE,
+      {begin: /\.$/} // relevance booster
     ]
   };
 }
diff --git a/src/languages/fsharp.js b/src/languages/fsharp.js
index 913632e..b0b4f31 100644
--- a/src/languages/fsharp.js
+++ b/src/languages/fsharp.js
@@ -6,6 +6,7 @@ Description: F# language definition.
 */
 function(hljs) {
   return {
+    aliases: ['fs'],
     keywords:
       'abstract and as assert base begin class default delegate do done ' +
       'downcast downto elif else end exception extern false finally for ' +
@@ -14,7 +15,6 @@ function(hljs) {
       'override private public rec return sig static struct then to ' +
       'true try type upcast use val void when while with yield',
     contains: [
-
       {
         className: 'string',
         begin: '@"', end: '"',
@@ -30,7 +30,7 @@ function(hljs) {
       },
       {
         className: 'class',
-        beginKeywords: 'type', end: '\\(|=|$',
+        beginKeywords: 'type', end: '\\(|=|$', excludeEnd: true,
         contains: [
           hljs.UNDERSCORE_TITLE_MODE
         ]
@@ -48,5 +48,5 @@ function(hljs) {
       hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),
       hljs.C_NUMBER_MODE
     ]
-  }
+  };
 }
diff --git a/src/languages/gherkin.js b/src/languages/gherkin.js
new file mode 100644
index 0000000..dd842af
--- /dev/null
+++ b/src/languages/gherkin.js
@@ -0,0 +1,35 @@
+/*
+ Language: Gherkin
+ Author: Sam Pikesley (@pikesley) <sam.pikesley at theodi.org>
+ Description: Gherkin (Cucumber etc)
+ */
+
+function (hljs) {
+  return {
+    keywords: 'Feature Background Ability Business\ Need Scenario Scenarios Scenario\ Outline Scenario\ Template Examples Given And Then But When',
+    contains: [
+      {
+        className: 'keyword',
+        begin: '\\*'
+      },
+      {
+        className: 'comment',
+        begin: '@[^@\r\n\t ]+', end: '$'
+      },
+      {
+        className: 'string',
+        begin: '\\|', end: '\\$'
+      },
+      {
+        className: 'variable',
+        begin: '<', end: '>',
+      },
+      hljs.HASH_COMMENT_MODE,
+      {
+        className: 'string',
+        begin: '"""', end: '"""'
+      },
+      hljs.QUOTE_STRING_MODE
+    ]
+  };
+}
diff --git a/src/languages/gradle.js b/src/languages/gradle.js
new file mode 100644
index 0000000..9c7e7d8
--- /dev/null
+++ b/src/languages/gradle.js
@@ -0,0 +1,40 @@
+/*
+Language: Gradle
+Author: Damian Mee <mee.damian at gmail.com>
+Website: http://meeDamian.com
+*/
+
+function(hljs) {
+  return {
+    case_insensitive: true,
+    keywords: {
+      keyword:
+        'task project allprojects subprojects artifacts buildscript configurations ' +
+        'dependencies repositories sourceSets description delete from into include ' +
+        'exclude source classpath destinationDir includes options sourceCompatibility ' +
+        'targetCompatibility group flatDir doLast doFirst flatten todir fromdir ant ' +
+        'def abstract break case catch continue default do else extends final finally ' +
+        'for if implements instanceof native new private protected public return static ' +
+        'switch synchronized throw throws transient try volatile while strictfp package ' +
+        'import false null super this true antlrtask checkstyle codenarc copy boolean ' +
+        'byte char class double float int interface long short void compile runTime ' +
+        'file fileTree abs any append asList asWritable call collect compareTo count ' +
+        'div dump each eachByte eachFile eachLine every find findAll flatten getAt ' +
+        'getErr getIn getOut getText grep immutable inject inspect intersect invokeMethods ' +
+        'isCase join leftShift minus multiply newInputStream newOutputStream newPrintWriter ' +
+        'newReader newWriter next plus pop power previous print println push putAt read ' +
+        'readBytes readLines reverse reverseEach round size sort splitEachLine step subMap ' +
+        'times toInteger toList tokenize upto waitForOrKill withPrintWriter withReader ' +
+        'withStream withWriter withWriterAppend write writeLine'
+    },
+    contains: [    
+      hljs.C_LINE_COMMENT_MODE,
+      hljs.C_BLOCK_COMMENT_MODE,
+      hljs.APOS_STRING_MODE,
+      hljs.QUOTE_STRING_MODE,
+      hljs.NUMBER_MODE,
+      hljs.REGEXP_MODE
+
+    ]
+  }
+}
diff --git a/src/languages/haml.js b/src/languages/haml.js
index 6d18f7b..9d538bb 100644
--- a/src/languages/haml.js
+++ b/src/languages/haml.js
@@ -106,7 +106,7 @@ function(hljs) {
                     relevance: 0
                   }
                 ]
-              },
+              }
             ]
           }
         ]
diff --git a/src/languages/handlebars.js b/src/languages/handlebars.js
index e468006..2b9e1c7 100644
--- a/src/languages/handlebars.js
+++ b/src/languages/handlebars.js
@@ -8,6 +8,7 @@ Description: Matcher for Handlebars as well as EmberJS additions.
 function(hljs) {
   var EXPRESSION_KEYWORDS = 'each in with if else unless bindattr action collection debugger log outlet template unbound view yield';
   return {
+    aliases: ['hbs', 'html.hbs', 'html.handlebars'],
     case_insensitive: true,
     subLanguage: 'xml', subLanguageMode: 'continuous',
     contains: [
diff --git a/src/languages/haskell.js b/src/languages/haskell.js
index be9beb8..c83b5c4 100644
--- a/src/languages/haskell.js
+++ b/src/languages/haskell.js
@@ -52,6 +52,7 @@ function(hljs) {
   };
 
   return {
+    aliases: ['hs'],
     keywords:
       'let in if then else case of where do module import hiding ' +
       'qualified type data newtype deriving class instance as default ' +
diff --git a/src/languages/actionscript.js b/src/languages/haxe.js
similarity index 53%
copy from src/languages/actionscript.js
copy to src/languages/haxe.js
index 82b082c..cae1dc3 100644
--- a/src/languages/actionscript.js
+++ b/src/languages/haxe.js
@@ -1,26 +1,19 @@
 /*
-Language: ActionScript
-Author: Alexander Myadzel <myadzel at gmail.com>
+Language: Haxe
+Author: Christopher Kaster <ikasoki at gmail.com> (Based on the actionscript.js language file by Alexander Myadzel)
 */
 
 function(hljs) {
   var IDENT_RE = '[a-zA-Z_$][a-zA-Z0-9_$]*';
   var IDENT_FUNC_RETURN_TYPE_RE = '([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)';
 
-  var AS3_REST_ARG_MODE = {
-    className: 'rest_arg',
-    begin: '[.]{3}', end: IDENT_RE,
-    relevance: 10
-  };
-
   return {
+    aliases: ['hx'],
     keywords: {
-      keyword: 'as break case catch class const continue default delete do dynamic each ' +
-        'else extends final finally for function get if implements import in include ' +
-        'instanceof interface internal is namespace native new override package private ' +
-        'protected public return set static super switch this throw try typeof use var void ' +
-        'while with',
-      literal: 'true false null undefined'
+      keyword: 'break callback case cast catch class continue default do dynamic else enum extends extern ' +
+		'for function here if implements import in inline interface never new override package private ' + 
+		'public return static super switch this throw trace try typedef untyped using var while',
+      literal: 'true false null'
     },
     contains: [
       hljs.APOS_STRING_MODE,
@@ -29,13 +22,8 @@ function(hljs) {
       hljs.C_BLOCK_COMMENT_MODE,
       hljs.C_NUMBER_MODE,
       {
-        className: 'package',
-        beginKeywords: 'package', end: '{',
-        contains: [hljs.TITLE_MODE]
-      },
-      {
         className: 'class',
-        beginKeywords: 'class interface', end: '{',
+        beginKeywords: 'class interface', end: '{', excludeEnd: true,
         contains: [
           {
             beginKeywords: 'extends implements'
@@ -45,11 +33,12 @@ function(hljs) {
       },
       {
         className: 'preprocessor',
-        beginKeywords: 'import include', end: ';'
+        begin: '#', end: '$',
+        keywords: 'if else elseif end error'
       },
       {
         className: 'function',
-        beginKeywords: 'function', end: '[{;]',
+        beginKeywords: 'function', end: '[{;]', excludeEnd: true,
         illegal: '\\S',
         contains: [
           hljs.TITLE_MODE,
@@ -60,8 +49,7 @@ function(hljs) {
               hljs.APOS_STRING_MODE,
               hljs.QUOTE_STRING_MODE,
               hljs.C_LINE_COMMENT_MODE,
-              hljs.C_BLOCK_COMMENT_MODE,
-              AS3_REST_ARG_MODE
+              hljs.C_BLOCK_COMMENT_MODE
             ]
           },
           {
diff --git a/src/languages/java.js b/src/languages/java.js
index e4763b8..7ac5754 100644
--- a/src/languages/java.js
+++ b/src/languages/java.js
@@ -10,6 +10,7 @@ function(hljs) {
     'enum else break transient new catch instanceof byte super volatile case assert short ' +
     'package default double public try this switch continue throws';
   return {
+    aliases: ['jsp'],
     keywords: KEYWORDS,
     illegal: /<\//,
     contains: [
@@ -31,8 +32,8 @@ function(hljs) {
         contains: [
           {
             className: 'class',
-            beginKeywords: 'class interface', endsWithParent: true,
-            illegal: /[:"<>]/,
+            beginKeywords: 'class interface', endsWithParent: true, excludeEnd: true,
+            illegal: /[:"\[\]]/,
             contains: [
               {
                 beginKeywords: 'extends implements',
diff --git a/src/languages/javascript.js b/src/languages/javascript.js
index 8dd0a7a..42754b1 100644
--- a/src/languages/javascript.js
+++ b/src/languages/javascript.js
@@ -18,7 +18,8 @@ function(hljs) {
         'EvalError InternalError RangeError ReferenceError StopIteration SyntaxError ' +
         'TypeError URIError Number Math Date String RegExp Array Float32Array ' +
         'Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array ' +
-        'Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require'
+        'Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require ' +
+        'module console window document'
     },
     contains: [
       {
@@ -48,7 +49,7 @@ function(hljs) {
       },
       {
         className: 'function',
-        beginKeywords: 'function', end: /\{/,
+        beginKeywords: 'function', end: /\{/, excludeEnd: true,
         contains: [
           hljs.inherit(hljs.TITLE_MODE, {begin: /[A-Za-z$_][0-9A-Za-z$_]*/}),
           {
diff --git a/src/languages/lasso.js b/src/languages/lasso.js
index 9a6ad91..4d9d88a 100644
--- a/src/languages/lasso.js
+++ b/src/languages/lasso.js
@@ -48,7 +48,7 @@ function(hljs) {
       className: 'markup',
       end: '\\[/noprocess\\]',
       returnEnd: true,
-      contains: [ HTML_COMMENT ]
+      contains: [HTML_COMMENT]
     }
   };
   var LASSO_START = {
@@ -63,7 +63,8 @@ function(hljs) {
     hljs.C_LINE_COMMENT_MODE,
     {
       className: 'javadoc',
-      begin: '/\\*\\*!', end: '\\*/'
+      begin: '/\\*\\*!', end: '\\*/',
+      contains: [hljs.PHRASAL_WORDS_MODE]
     },
     hljs.C_BLOCK_COMMENT_MODE,
     hljs.inherit(hljs.C_NUMBER_MODE, {begin: hljs.C_NUMBER_RE + '|-?(infinity|nan)\\b'}),
@@ -92,14 +93,22 @@ function(hljs) {
     },
     {
       className: 'attribute',
-      begin: '\\.\\.\\.|-' + hljs.UNDERSCORE_IDENT_RE
+      variants: [
+        {
+          begin: '-' + hljs.UNDERSCORE_IDENT_RE,
+          relevance: 0
+        },
+        {
+          begin: '(\\.\\.\\.)'
+        }
+      ]
     },
     {
       className: 'subst',
       variants: [
         {
           begin: '->\\s*',
-          contains: [ LASSO_DATAMEMBER ]
+          contains: [LASSO_DATAMEMBER]
         },
         {
           begin: ':=|/(?!\\w)=?|[-+*%=<>&|!?\\\\]+',
@@ -111,7 +120,7 @@ function(hljs) {
       className: 'built_in',
       begin: '\\.\\.?',
       relevance: 0,
-      contains: [ LASSO_DATAMEMBER ]
+      contains: [LASSO_DATAMEMBER]
     },
     {
       className: 'class',
@@ -137,7 +146,7 @@ function(hljs) {
           end: '\\[|' + LASSO_ANGLE_RE,
           returnEnd: true,
           relevance: 0,
-          contains: [ HTML_COMMENT ]
+          contains: [HTML_COMMENT]
         }
       },
       LASSO_NOPROCESS,
@@ -158,7 +167,7 @@ function(hljs) {
                 className: 'markup',
                 end: LASSO_ANGLE_RE,
                 returnEnd: true,
-                contains: [ HTML_COMMENT ]
+                contains: [HTML_COMMENT]
               }
             },
             LASSO_NOPROCESS,
diff --git a/src/languages/lisp.js b/src/languages/lisp.js
index 0105688..7549e88 100644
--- a/src/languages/lisp.js
+++ b/src/languages/lisp.js
@@ -47,14 +47,18 @@ function(hljs) {
     contains: [NUMBER, STRING, VARIABLE, KEYWORD, QUOTED_LIST],
     variants: [
       {
-        begin: '[\'`]\\(', end: '\\)',
+        begin: '[\'`]\\(', end: '\\)'
       },
       {
         begin: '\\(quote ', end: '\\)',
-        keywords: {title: 'quote'},
+        keywords: {title: 'quote'}
       }
     ]
   };
+  var QUOTED_ATOM = {
+    className: 'quoted',
+    begin: '\'' + LISP_IDENT_RE
+  };
   var LIST = {
     className: 'list',
     begin: '\\(', end: '\\)'
@@ -64,7 +68,7 @@ function(hljs) {
     relevance: 0
   };
   LIST.contains = [{className: 'title', begin: LISP_IDENT_RE}, BODY];
-  BODY.contains = [QUOTED, LIST, LITERAL, NUMBER, STRING, COMMENT, VARIABLE, KEYWORD];
+  BODY.contains = [QUOTED, QUOTED_ATOM, LIST, LITERAL, NUMBER, STRING, COMMENT, VARIABLE, KEYWORD];
 
   return {
     illegal: /\S/,
@@ -75,6 +79,7 @@ function(hljs) {
       STRING,
       COMMENT,
       QUOTED,
+      QUOTED_ATOM,
       LIST
     ]
   };
diff --git a/src/languages/livecodeserver.js b/src/languages/livecodeserver.js
index 19883d6..34752e0 100644
--- a/src/languages/livecodeserver.js
+++ b/src/languages/livecodeserver.js
@@ -17,10 +17,10 @@ function(hljs) {
       hljs.C_BLOCK_COMMENT_MODE,
       hljs.HASH_COMMENT_MODE,
       {
-        begin: '--',
+        begin: '--'
       },
       {
-        begin: '[^:]//',
+        begin: '[^:]//'
       }
     ]
   };
diff --git a/src/languages/lua.js b/src/languages/lua.js
index eea26ff..6156477 100644
--- a/src/languages/lua.js
+++ b/src/languages/lua.js
@@ -54,7 +54,7 @@ function(hljs) {
         className: 'string',
         begin: OPENING_LONG_BRACKET, end: CLOSING_LONG_BRACKET,
         contains: [LONG_BRACKETS],
-        relevance: 10
+        relevance: 5
       }
     ])
   };
diff --git a/src/languages/makefile.js b/src/languages/makefile.js
index f796b70..99de6cd 100644
--- a/src/languages/makefile.js
+++ b/src/languages/makefile.js
@@ -8,8 +8,9 @@ function(hljs) {
     className: 'variable',
     begin: /\$\(/, end: /\)/,
     contains: [hljs.BACKSLASH_ESCAPE]
-  }
+  };
   return {
+    aliases: ['mk', 'mak'],
     contains: [
       hljs.HASH_COMMENT_MODE,
       {
@@ -23,7 +24,7 @@ function(hljs) {
             relevance: 0,
             contains: [
               VARIABLE
-            ],
+            ]
           }
         }
       },
diff --git a/src/languages/markdown.js b/src/languages/markdown.js
index e13b089..201b71a 100644
--- a/src/languages/markdown.js
+++ b/src/languages/markdown.js
@@ -7,6 +7,7 @@ Website: http://seejohncode.com/
 
 function(hljs) {
   return {
+    aliases: ['md', 'mkdown', 'mkd'],
     contains: [
       // highlight headers
       {
@@ -82,7 +83,7 @@ function(hljs) {
           {
             className: 'link_reference',
             begin: '\\]\\[', end: '\\]',
-            excludeBegin: true, excludeEnd: true,
+            excludeBegin: true, excludeEnd: true
           }
         ],
         relevance: 10
diff --git a/src/languages/matlab.js b/src/languages/matlab.js
index 18081d2..43f1a0d 100644
--- a/src/languages/matlab.js
+++ b/src/languages/matlab.js
@@ -5,7 +5,6 @@ Contributors: Eugene Nizhibitsky <nizhibitsky at ya.ru>
 */
 
 function(hljs) {
-
   var COMMON_CONTAINS = [
     hljs.C_NUMBER_MODE,
     {
@@ -66,9 +65,13 @@ function(hljs) {
       },
       {
         className: 'cell',
-        begin: '\\{', end: '\\}\'*[\\.\']*',
+        begin: '\\{',
         contains: COMMON_CONTAINS,
-        illegal: /:/
+        illegal: /:/,
+        variants: [
+          {end: /\}'[\.']*/},
+          {end: /\}/, relevance: 0}
+        ]
       },
       {
         className: 'comment',
diff --git a/src/languages/monkey.js b/src/languages/monkey.js
new file mode 100644
index 0000000..15da987
--- /dev/null
+++ b/src/languages/monkey.js
@@ -0,0 +1,83 @@
+/*
+Language: Monkey
+Author: Arthur Bikmullin <devolonter at gmail.com>
+*/
+
+function(hljs) {
+  var NUMBER = {
+    variants: [
+      {
+        className: 'number',
+        begin: '[$][a-fA-F0-9]+'
+      },
+      hljs.NUMBER_MODE
+    ]
+  }
+
+  return {
+    case_insensitive: true,
+    keywords: {
+      keyword: 'public private property continue exit extern new try catch ' +
+        'eachin not abstract final select case default const local global field ' +
+        'end if then else elseif endif while wend repeat until forever for to step next return module inline throw',
+
+      built_in: 'DebugLog DebugStop Error Print ACos ACosr ASin ASinr ATan ATan2 ATan2r ATanr Abs Abs Ceil ' +
+        'Clamp Clamp Cos Cosr Exp Floor Log Max Max Min Min Pow Sgn Sgn Sin Sinr Sqrt Tan Tanr Seed PI HALFPI TWOPI',
+
+      literal: 'true false null and or shl shr mod'
+    },
+    contains: [
+      {
+        className: 'comment',
+        begin: '#rem', end: '#end'
+      },
+      {
+        className: 'comment',
+        begin: "'", end: '$',
+        relevance: 0
+      },
+      {
+        className: 'function',
+        beginKeywords: 'function method', end: '[(=:]|$',
+        illegal: /\n/,
+        contains: [
+          hljs.UNDERSCORE_TITLE_MODE,
+        ]
+      },
+      {
+        className: 'class',
+        beginKeywords: 'class interface', end: '$',
+        contains: [
+          {
+            beginKeywords: 'extends implements'
+          },
+          hljs.UNDERSCORE_TITLE_MODE
+        ]
+      },
+      {
+        className: 'variable',
+        begin: '\\b(self|super)\\b'
+      },
+      {
+        className: 'preprocessor',
+        beginKeywords: 'import',
+        end: '$'
+      },
+      {
+        className: 'preprocessor',
+        begin: '\\s*#', end: '$',
+        keywords: 'if else elseif endif end then'
+      },
+      {
+        className: 'pi',
+        begin: '^\\s*strict\\b'
+      },
+      {
+        beginKeywords: 'alias', end: '=',
+        contains: [hljs.UNDERSCORE_TITLE_MODE]
+      },
+      hljs.QUOTE_STRING_MODE,
+      NUMBER
+    ]
+  }
+}
diff --git a/src/languages/nginx.js b/src/languages/nginx.js
index 97c9c4e..8b60f2a 100644
--- a/src/languages/nginx.js
+++ b/src/languages/nginx.js
@@ -66,12 +66,17 @@ function(hljs) {
   };
 
   return {
+    aliases: ['nginxconf'],
     contains: [
       hljs.HASH_COMMENT_MODE,
       {
         begin: hljs.UNDERSCORE_IDENT_RE + '\\s', end: ';|{', returnBegin: true,
         contains: [
-          hljs.inherit(hljs.UNDERSCORE_TITLE_MODE, {starts: DEFAULT})
+          {
+            className: 'title',
+            begin: hljs.UNDERSCORE_IDENT_RE,
+            starts: DEFAULT
+          }
         ],
         relevance: 0
       }
diff --git a/src/languages/nimrod.js b/src/languages/nimrod.js
new file mode 100644
index 0000000..34bb084
--- /dev/null
+++ b/src/languages/nimrod.js
@@ -0,0 +1,58 @@
+/*
+Language: Nimrod
+*/
+
+function(hljs) {
+  return {
+    keywords: {
+      keyword: 'addr and as asm bind block break|0 case|0 cast const|0 continue|0 converter discard distinct|10 div do elif else|0 end|0 enum|0 except export finally for from generic if|0 import|0 in include|0 interface is isnot|10 iterator|10 let|0 macro method|10 mixin mod nil not notin|10 object|0 of or out proc|10 ptr raise ref|10 return shl shr static template|10 try|0 tuple type|0 using|0 var|0 when while|0 with without xor yield',
+      literal: 'shared guarded stdin stdout stderr result|10 true false'
+    },
+    contains: [ {
+        className: 'decorator', // Actually pragma
+        begin: /{\./,
+        end: /\.}/,
+        relevance: 10
+      }, {
+        className: 'string',
+        begin: /[a-zA-Z]\w*"/,
+        end: /"/,
+        contains: [{begin: /""/}]
+      }, {
+        className: 'string',
+        begin: /([a-zA-Z]\w*)?"""/,
+        end: /"""/
+      }, {
+        className: 'string',
+        begin: /"/,
+        end: /"/,
+        illegal: /\n/,
+        contains: [{begin: /\\./}]
+      }, {
+        className: 'type',
+        begin: /\b[A-Z]\w+\b/,
+        relevance: 0
+      }, {
+        className: 'type',
+        begin: /\b(int|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|float|float32|float64|bool|char|string|cstring|pointer|expr|stmt|void|auto|any|range|array|openarray|varargs|seq|set|clong|culong|cchar|cschar|cshort|cint|csize|clonglong|cfloat|cdouble|clongdouble|cuchar|cushort|cuint|culonglong|cstringarray|semistatic)\b/
+      }, {
+        className: 'number',
+        begin: /\b(0[xX][0-9a-fA-F][_0-9a-fA-F]*)('?[iIuU](8|16|32|64))?/,
+        relevance: 0
+      }, {
+        className: 'number',
+        begin: /\b(0o[0-7][_0-7]*)('?[iIuUfF](8|16|32|64))?/,
+        relevance: 0
+      }, {
+        className: 'number',
+        begin: /\b(0(b|B)[01][_01]*)('?[iIuUfF](8|16|32|64))?/,
+        relevance: 0
+      }, {
+        className: 'number',
+        begin: /\b(\d[_\d]*)('?[iIuUfF](8|16|32|64))?/,
+        relevance: 0
+      },
+      hljs.HASH_COMMENT_MODE
+    ]
+  }
+}
\ No newline at end of file
diff --git a/src/languages/nix.js b/src/languages/nix.js
new file mode 100644
index 0000000..2c45e53
--- /dev/null
+++ b/src/languages/nix.js
@@ -0,0 +1,56 @@
+/*
+Language: Nix
+Author: Domen Kožar <domen at dev.si>
+Description: Nix functional language. See http://nixos.org/nix
+*/
+
+
+function(hljs) {
+  var NIX_KEYWORDS = {
+    keyword: 'rec with let in inherit assert if else then',
+    constant: 'true false or and null',
+    built_in:
+      'import abort baseNameOf dirOf isNull builtins map removeAttrs throw toString derivation'
+  };
+  var ANTIQUOTE = {
+    className: 'subst',
+    begin: /\$\{/,
+    end: /\}/,
+    keywords: NIX_KEYWORDS
+  };
+  var ATTRS = {
+    className: 'variable',
+    // TODO: we have to figure out a way how to exclude \s*=
+    begin: /[a-zA-Z0-9-_]+(\s*=)/
+  };
+  var SINGLE_QUOTE = {
+    className: 'string',
+    begin: "''",
+    end: "''",
+    contains: [
+      ANTIQUOTE
+    ]
+  };
+  var DOUBLE_QUOTE = {
+    className: 'string',
+    begin: '"',
+    end: '"',
+    contains: [
+      ANTIQUOTE
+    ]
+  };
+  var EXPRESSIONS = [
+    hljs.NUMBER_MODE,
+    hljs.HASH_COMMENT_MODE,
+    hljs.C_BLOCK_COMMENT_MODE,
+    SINGLE_QUOTE,
+    DOUBLE_QUOTE,
+    ATTRS
+  ];  
+  ANTIQUOTE.contains = EXPRESSIONS;
+  return {
+    aliases: ["nixos"],
+    keywords: NIX_KEYWORDS,
+    contains: EXPRESSIONS
+  };
+}
diff --git a/src/languages/nsis.js b/src/languages/nsis.js
new file mode 100644
index 0000000..294bcfd
--- /dev/null
+++ b/src/languages/nsis.js
@@ -0,0 +1,92 @@
+/*
+Language: NSIS
+Description: Nullsoft Scriptable Install System
+Author: Jan T. Sott <jan.sott at gmail.com>
+Website: http://github.com/idleberg
+*/
+
+function(hljs) {
+  var CONSTANTS = {
+    className: 'symbol',
+    begin: '\\$(ADMINTOOLS|APPDATA|CDBURN_AREA|CMDLINE|COMMONFILES32|COMMONFILES64|COMMONFILES|COOKIES|DESKTOP|DOCUMENTS|EXEDIR|EXEFILE|EXEPATH|FAVORITES|FONTS|HISTORY|HWNDPARENT|INSTDIR|INTERNET_CACHE|LANGUAGE|LOCALAPPDATA|MUSIC|NETHOOD|OUTDIR|PICTURES|PLUGINSDIR|PRINTHOOD|PROFILE|PROGRAMFILES32|PROGRAMFILES64|PROGRAMFILES|QUICKLAUNCH|RECENT|RESOURCES_LOCALIZED|RESOURCES|SENDTO|SMPROGRAMS|SMSTARTUP|STARTMENU|SYSDIR|TEMP|TEMPLATES|VIDEOS|WINDIR)'
+  };
+
+  var DEFINES = {
+    // ${defines}
+    className: 'constant',
+    begin: '\\$+{[a-zA-Z0-9_]+}'
+  };
+
+  var VARIABLES = {
+    // $variables
+    className: 'variable',
+    begin: '\\$+[a-zA-Z0-9_]+',
+    illegal: '\\(\\){}'
+  };
+
+  var LANGUAGES = {
+    // $(language_strings)
+    className: 'constant',
+    begin: '\\$+\\([a-zA-Z0-9_]+\\)'
+  };
+
+  var PARAMETERS = {
+    // command parameters
+    className: 'params',
+    begin: '(ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HKCR|HKCU|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM|HKPD|HKU|IDABORT|IDCANCEL|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|M [...]
+  };
+
+  var COMPILER ={
+    // !compiler_flags
+    className: 'constant',
+    begin: '\\!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversionsystem|ifdef|ifmacrodef|ifmacrondef|ifndef|if|include|insertmacro|macroend|macro|packhdr|searchparse|searchreplace|tempfile|undef|verbose|warning)'
+  };
+
+  return {
+    case_insensitive: false,
+    keywords: {
+      keyword:
+      'Abort AddBrandingImage AddSize AllowRootDirInstall AllowSkipFiles AutoCloseWindow BGFont BGGradient BrandingText BringToFront Call CallInstDLL Caption ChangeUI CheckBitmap ClearErrors CompletedText ComponentText CopyFiles CRCCheck CreateDirectory CreateFont CreateShortCut Delete DeleteINISec DeleteINIStr DeleteRegKey DeleteRegValue DetailPrint DetailsButtonText DirText DirVar DirVerify EnableWindow EnumRegKey EnumRegValue Exch Exec ExecShell ExecWait ExpandEnvStrings File FileBufS [...]
+      literal:
+      'admin all auto both colored current false force hide highest lastused leave listonly none normal notset off on open print show silent silentlog smooth textonly true user '
+    },
+    contains: [
+      hljs.HASH_COMMENT_MODE,
+      hljs.C_BLOCK_COMMENT_MODE,
+      {
+        className: 'string',
+        begin: '"', end: '"',
+        illegal: '\\n',
+        contains: [
+          { // $\n, $\r, $\t, $$
+            className: 'symbol',
+            begin: '\\$(\\\\(n|r|t)|\\$)'
+          },
+          CONSTANTS,
+          DEFINES,
+          VARIABLES,
+          LANGUAGES
+        ]
+      },
+      { // line comments
+        className: 'comment',
+        begin: ';', end: '$',
+        relevance: 0
+      },
+      {
+        className: 'function',
+        beginKeywords: 'Function PageEx Section SectionGroup SubSection', end: '$'
+      },
+      COMPILER,
+      DEFINES,
+      VARIABLES,
+      LANGUAGES,
+      PARAMETERS,
+      hljs.NUMBER_MODE,
+      { // plug::ins
+        className: 'literal',
+        begin: hljs.IDENT_RE + '::' + hljs.IDENT_RE
+      }
+    ]
+  };
+}
diff --git a/src/languages/objectivec.js b/src/languages/objectivec.js
index 79ed765..081cf0e 100644
--- a/src/languages/objectivec.js
+++ b/src/languages/objectivec.js
@@ -1,7 +1,7 @@
 /*
 Language: Objective C
 Author: Valerii Hiora <valerii.hiora at gmail.com>
-Contributors: Angel G. Olloqui <angelgarcia.mail at gmail.com>
+Contributors: Angel G. Olloqui <angelgarcia.mail at gmail.com>, Matt Diephouse <matt at diephouse.com>
 */
 
 function(hljs) {
@@ -11,14 +11,16 @@ function(hljs) {
       'unsigned long volatile static bool mutable if do return goto void ' +
       'enum else break extern asm case short default double register explicit ' +
       'signed typename this switch continue wchar_t inline readonly assign ' +
-      'self synchronized id ' +
-      'nonatomic super unichar IBOutlet IBAction strong weak ' +
+      'readwrite self @synchronized id typeof ' +
+      'nonatomic super unichar IBOutlet IBAction strong weak copy ' +
+      'in out inout bycopy byref oneway __strong __weak __block __autoreleasing ' +
       '@private @protected @public @try @property @end @throw @catch @finally ' +
-      '@synthesize @dynamic @selector @optional @required',
+      '@autoreleasepool @synthesize @dynamic @selector @optional @required',
     literal:
     	'false true FALSE TRUE nil YES NO NULL',
     built_in:
       'NSString NSDictionary CGRect CGPoint UIButton UILabel UITextView UIWebView MKMapView ' +
+      'NSView NSViewController NSWindow NSWindowController NSSet NSUUID NSIndexSet ' +
       'UISegmentedControl NSObject UITableViewDelegate UITableViewDataSource NSThread ' +
       'UIActivityIndicator UITabbar UIToolBar UIBarButtonItem UIImageView NSAutoreleasePool ' +
       'UITableView BOOL NSInteger CGFloat NSException NSLog NSMutableString NSMutableArray ' +
@@ -35,6 +37,7 @@ function(hljs) {
   var LEXEMES = /[a-zA-Z@][a-zA-Z0-9_]*/;
   var CLASS_KEYWORDS = '@interface @class @protocol @implementation';
   return {
+    aliases: ['m', 'mm', 'objc', 'obj-c'],
     keywords: OBJC_KEYWORDS, lexemes: LEXEMES,
     illegal: '</',
     contains: [
@@ -44,36 +47,35 @@ function(hljs) {
       hljs.QUOTE_STRING_MODE,
       {
         className: 'string',
-        begin: '\'',
-        end: '[^\\\\]\'',
-        illegal: '[^\\\\][^\']'
+        variants: [
+          {
+            begin: '@"', end: '"',
+            illegal: '\\n',
+            contains: [hljs.BACKSLASH_ESCAPE]
+          },
+          {
+            begin: '\'', end: '[^\\\\]\'',
+            illegal: '[^\\\\][^\']'
+          }
+        ]
       },
-
       {
         className: 'preprocessor',
-        begin: '#import',
+        begin: '#',
         end: '$',
         contains: [
-        {
-          className: 'title',
-          begin: '\"',
-          end: '\"'
-        },
-        {
-          className: 'title',
-          begin: '<',
-          end: '>'
-        }
+          {
+            className: 'title',
+            variants: [
+              { begin: '\"', end: '\"' },
+              { begin: '<', end: '>' }
+            ]
+          }
         ]
       },
       {
-        className: 'preprocessor',
-        begin: '#',
-        end: '$'
-      },
-      {
         className: 'class',
-        begin: '(' + CLASS_KEYWORDS.split(' ').join('|') + ')\\b', end: '({|$)',
+        begin: '(' + CLASS_KEYWORDS.split(' ').join('|') + ')\\b', end: '({|$)', excludeEnd: true,
         keywords: CLASS_KEYWORDS, lexemes: LEXEMES,
         contains: [
           hljs.UNDERSCORE_TITLE_MODE
diff --git a/src/languages/ocaml.js b/src/languages/ocaml.js
index bfcd768..da70645 100644
--- a/src/languages/ocaml.js
+++ b/src/languages/ocaml.js
@@ -6,6 +6,7 @@ Description: OCaml language definition.
 */
 function(hljs) {
   return {
+    aliases: ['ml'],
     keywords: {
       keyword:
         'and as assert asr begin class constraint do done downto else end ' +
@@ -15,7 +16,7 @@ function(hljs) {
         'then to true try type val virtual when while with parser value',
       built_in:
         'bool char float int list unit array exn option int32 int64 nativeint ' +
-        'format4 format6 lazy_t in_channel out_channel string',
+        'format4 format6 lazy_t in_channel out_channel string'
     },
     illegal: /\/\//,
     contains: [
@@ -30,7 +31,7 @@ function(hljs) {
       },
       {
         className: 'class',
-        beginKeywords: 'type', end: '\\(|=|$',
+        beginKeywords: 'type', end: '\\(|=|$', excludeEnd: true,
         contains: [
           hljs.UNDERSCORE_TITLE_MODE
         ]
diff --git a/src/languages/oxygene.js b/src/languages/oxygene.js
index 7290d8c..8ece00f 100644
--- a/src/languages/oxygene.js
+++ b/src/languages/oxygene.js
@@ -7,12 +7,12 @@ Description: Language definition for RemObjects Oxygene (http://www.remobjects.c
 function(hljs) {
   var OXYGENE_KEYWORDS = 'abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue '+
     'create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false '+
-	'final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited'+
-	' inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of '+
-	'old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly '+
-	'record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple '+
-	'type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal '+
-	'register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained';
+    'final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited '+
+    'inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of '+
+    'old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly '+
+    'record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple '+
+    'type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal '+
+    'register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained';
   var CURLY_COMMENT =  {
     className: 'comment',
     begin: '{', end: '}',
diff --git a/src/languages/perl.js b/src/languages/perl.js
index 3b26c93..15048bb 100644
--- a/src/languages/perl.js
+++ b/src/languages/perl.js
@@ -36,15 +36,15 @@ function(hljs) {
     className: 'variable',
     variants: [
       {begin: /\$\d/},
-      {begin: /[\$\%\@\*](\^\w\b|#\w+(\:\:\w+)*|{\w+}|\w+(\:\:\w*)*)/},
-      {begin: /[\$\%\@\*][^\s\w{]/, relevance: 0}
+      {begin: /[\$\%\@](\^\w\b|#\w+(\:\:\w+)*|{\w+}|\w+(\:\:\w*)*)/},
+      {begin: /[\$\%\@][^\s\w{]/, relevance: 0}
     ]
   };
   var COMMENT = {
     className: 'comment',
     begin: '^(__END__|__DATA__)', end: '\\n$',
     relevance: 5
-  }
+  };
   var STRING_CONTAINS = [hljs.BACKSLASH_ESCAPE, SUBST, VAR];
   var PERL_DEFAULT_CONTAINS = [
     VAR,
@@ -146,6 +146,7 @@ function(hljs) {
   METHOD.contains = PERL_DEFAULT_CONTAINS;
 
   return {
+    aliases: ['pl'],
     keywords: PERL_KEYWORDS,
     contains: PERL_DEFAULT_CONTAINS
   };
diff --git a/src/languages/php.js b/src/languages/php.js
index 72f0aa8..d4e1495 100644
--- a/src/languages/php.js
+++ b/src/languages/php.js
@@ -6,7 +6,7 @@ Contributors: Evgeny Stepanischev <imbolk at gmail.com>, Ivan Sagalaev <maniac at soft
 
 function(hljs) {
   var VARIABLE = {
-    className: 'variable', begin: '\\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
+    className: 'variable', begin: '(\\$|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
   };
   var PREPROCESSOR = {
     className: 'preprocessor', begin: /<\?(php)?|\?>/
@@ -27,6 +27,7 @@ function(hljs) {
   };
   var NUMBER = {variants: [hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE]};
   return {
+    aliases: ['php3', 'php4', 'php5', 'php6'],
     case_insensitive: true,
     keywords:
       'and include_once list abstract global private echo interface as static endswitch ' +
@@ -65,7 +66,7 @@ function(hljs) {
       VARIABLE,
       {
         className: 'function',
-        beginKeywords: 'function', end: /[;{]/,
+        beginKeywords: 'function', end: /[;{]/, excludeEnd: true,
         illegal: '\\$|\\[|%',
         contains: [
           hljs.UNDERSCORE_TITLE_MODE,
@@ -84,7 +85,7 @@ function(hljs) {
       },
       {
         className: 'class',
-        beginKeywords: 'class interface', end: '{',
+        beginKeywords: 'class interface', end: '{', excludeEnd: true,
         illegal: /[:\(\$"]/,
         contains: [
           {
diff --git a/src/languages/protobuf.js b/src/languages/protobuf.js
new file mode 100644
index 0000000..6611054
--- /dev/null
+++ b/src/languages/protobuf.js
@@ -0,0 +1,42 @@
+/*
+Language: Protocol Buffers
+Author: Dan Tao <daniel.tao at gmail.com>
+Description: Protocol buffer message definition format
+*/
+
+function(hljs) {
+  return {
+    keywords: {
+      keyword: 'package import option optional required repeated group',
+      built_in: 'double float int32 int64 uint32 uint64 sint32 sint64 ' +
+        'fixed32 fixed64 sfixed32 sfixed64 bool string bytes',
+      literal: 'true false'
+    },
+    contains: [
+      hljs.QUOTE_STRING_MODE,
+      hljs.NUMBER_MODE,
+      hljs.C_LINE_COMMENT_MODE,
+      {
+        className: 'class',
+        beginKeywords: 'message enum service', end: /\{/,
+        illegal: /\n/,
+        contains: [
+          hljs.inherit(hljs.TITLE_MODE, {
+            starts: {endsWithParent: true, excludeEnd: true} // hack: eating everything after the first title
+          })
+        ]
+      },
+      {
+        className: 'function',
+        beginKeywords: 'rpc',
+        end: /;/, excludeEnd: true,
+        keywords: 'rpc returns'
+      },
+      {
+        className: 'constant',
+        begin: /^\s*[A-Z_]+/,
+        end: /\s*=/, excludeEnd: true
+      }
+    ]
+  };
+}
diff --git a/src/languages/python.js b/src/languages/python.js
index dbd706b..f8faf15 100644
--- a/src/languages/python.js
+++ b/src/languages/python.js
@@ -5,7 +5,7 @@ Language: Python
 function(hljs) {
   var PROMPT = {
     className: 'prompt',  begin: /^(>>>|\.\.\.) /
-  }
+  };
   var STRING = {
     className: 'string',
     contains: [hljs.BACKSLASH_ESCAPE],
@@ -29,10 +29,10 @@ function(hljs) {
         relevance: 10
       },
       {
-        begin: /(b|br)'/, end: /'/,
+        begin: /(b|br)'/, end: /'/
       },
       {
-        begin: /(b|br)"/, end: /"/,
+        begin: /(b|br)"/, end: /"/
       },
       hljs.APOS_STRING_MODE,
       hljs.QUOTE_STRING_MODE
@@ -45,7 +45,7 @@ function(hljs) {
       {begin: '\\b(0o[0-7]+)[lLjJ]?'},
       {begin: hljs.C_NUMBER_RE + '[lLjJ]?'}
     ]
-  }
+  };
   var PARAMS = {
     className: 'params',
     begin: /\(/, end: /\)/,
@@ -58,6 +58,7 @@ function(hljs) {
   };
 
   return {
+    aliases: ['py', 'gyp'],
     keywords: {
       keyword:
         'and elif is global as in if from raise for except finally print import pass return ' +
diff --git a/src/languages/ruby.js b/src/languages/ruby.js
index 9e114f6..8806f91 100644
--- a/src/languages/ruby.js
+++ b/src/languages/ruby.js
@@ -1,7 +1,7 @@
 /*
 Language: Ruby
 Author: Anton Kovalyov <anton at kovalyov.net>
-Contributors: Peter Leonov <gojpeg at yandex.ru>, Vasily Polovnyov <vast at whiteants.net>, Loren Segal <lsegal at soen.ca>
+Contributors: Peter Leonov <gojpeg at yandex.ru>, Vasily Polovnyov <vast at whiteants.net>, Loren Segal <lsegal at soen.ca>, Pascal Hurni <phi at ruby-reactive.org>
 */
 
 function(hljs) {
@@ -14,6 +14,10 @@ function(hljs) {
     className: 'yardoctag',
     begin: '@[A-Za-z]+'
   };
+  var IRB_OBJECT = {
+    className: 'value',
+    begin: '#<', end: '>'
+  };
   var COMMENT = {
     className: 'comment',
     variants: [
@@ -45,26 +49,11 @@ function(hljs) {
       {begin: '%[qw]?\\(', end: '\\)'},
       {begin: '%[qw]?\\[', end: '\\]'},
       {begin: '%[qw]?{', end: '}'},
-      {
-        begin: '%[qw]?<', end: '>',
-        relevance: 10
-      },
-      {
-        begin: '%[qw]?/', end: '/',
-        relevance: 10
-      },
-      {
-        begin: '%[qw]?%', end: '%',
-        relevance: 10
-      },
-      {
-        begin: '%[qw]?-', end: '-',
-        relevance: 10
-      },
-      {
-        begin: '%[qw]?\\|', end: '\\|',
-        relevance: 10
-      },
+      {begin: '%[qw]?<', end: '>'},
+      {begin: '%[qw]?/', end: '/'},
+      {begin: '%[qw]?%', end: '%'},
+      {begin: '%[qw]?-', end: '-'},
+      {begin: '%[qw]?\\|', end: '\\|'},
       {
         // \B in the beginning suppresses recognition of ?-sequences where ?
         // is the last character of a preceding identifier, as in: `func?4`
@@ -80,6 +69,7 @@ function(hljs) {
 
   var RUBY_DEFAULT_CONTAINS = [
     STRING,
+    IRB_OBJECT,
     COMMENT,
     {
       className: 'class',
@@ -136,6 +126,7 @@ function(hljs) {
     { // regexp container
       begin: '(' + hljs.RE_STARTERS_RE + ')\\s*',
       contains: [
+        IRB_OBJECT,
         COMMENT,
         {
           className: 'regexp',
@@ -155,9 +146,45 @@ function(hljs) {
   ];
   SUBST.contains = RUBY_DEFAULT_CONTAINS;
   PARAMS.contains = RUBY_DEFAULT_CONTAINS;
+  
+  var IRB_DEFAULT = [
+    {
+      relevance: 1,
+      className: 'output',
+      begin: '^\\s*=> ', end: "$",
+      returnBegin: true,
+      contains: [
+        {
+          className: 'status',
+          begin: '^\\s*=>'
+        },
+        {
+          begin: ' ', end: '$',
+          contains: RUBY_DEFAULT_CONTAINS
+        }
+      ]
+    },
+    {
+      relevance: 1,
+      className: 'input',
+      begin: '^[^ ][^=>]*>+ ', end: "$",
+      returnBegin: true,
+      contains: [
+        {
+          className: 'prompt',
+          begin: '^[^ ][^=>]*>+'
+        },
+        {
+          begin: ' ', end: '$',
+          contains: RUBY_DEFAULT_CONTAINS
+        }
+      ]
+    }
+  ];
 
   return {
+    aliases: ['rb', 'gemspec', 'podspec', 'thor', 'irb'],
     keywords: RUBY_KEYWORDS,
-    contains: RUBY_DEFAULT_CONTAINS
+    contains: IRB_DEFAULT.concat(RUBY_DEFAULT_CONTAINS)
   };
 }
diff --git a/src/languages/rust.js b/src/languages/rust.js
index 766e690..9c9a951 100644
--- a/src/languages/rust.js
+++ b/src/languages/rust.js
@@ -1,32 +1,45 @@
 /*
 Language: Rust
 Author: Andrey Vlasovskikh <andrey.vlasovskikh at gmail.com>
+Contributors: Roman Shmatov <romanshmatov at gmail.com>
 */
 
 function(hljs) {
-  var NUMBER = {
-    className: 'number',
-    begin: '\\b(0[xb][A-Za-z0-9_]+|[0-9_]+(\\.[0-9_]+)?([uif](8|16|32|64)?)?)',
-    relevance: 0
-  };
-  var KEYWORDS =
-    'assert bool break char check claim comm const cont copy dir do drop ' +
-    'else enum extern export f32 f64 fail false float fn for i16 i32 i64 i8 ' +
-    'if impl int let log loop match mod move mut priv pub pure ref return ' +
-    'self static str struct task true trait type u16 u32 u64 u8 uint unsafe ' +
-    'use vec while';
   return {
-    keywords: KEYWORDS,
+    aliases: ['rs'],
+    keywords:
+      'alignof as be box break const continue crate do else enum extern ' +
+      'false fn for if impl in let loop match mod mut offsetof once priv ' +
+      'proc pub pure ref return self sizeof static struct super trait true ' +
+      'type typeof unsafe unsized use virtual while yield ' +
+      'int i8 i16 i32 i64 ' +
+      'uint u8 u32 u64 ' +
+      'float f32 f64 ' +
+      'str char bool',
     illegal: '</',
     contains: [
       hljs.C_LINE_COMMENT_MODE,
       hljs.C_BLOCK_COMMENT_MODE,
       hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),
-      hljs.APOS_STRING_MODE,
-      NUMBER,
+      {
+        className: 'string',
+        begin: /r(#*)".*?"\1(?!#)/
+      },
+      {
+        className: 'string',
+        begin: /'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/
+      },
+      {
+        begin: /'[a-zA-Z_][a-zA-Z0-9_]*/
+      },
+      {
+        className: 'number',
+        begin: '\\b(0[xb][A-Za-z0-9_]+|[0-9_]+(\\.[0-9_]+)?([uif](8|16|32|64)?)?)',
+        relevance: 0
+      },
       {
         className: 'function',
-        beginKeywords: 'fn', end: '(\\(|<)',
+        beginKeywords: 'fn', end: '(\\(|<)', excludeEnd: true,
         contains: [hljs.UNDERSCORE_TITLE_MODE]
       },
       {
@@ -42,6 +55,12 @@ function(hljs) {
         beginKeywords: 'trait enum', end: '({|<)',
         contains: [hljs.UNDERSCORE_TITLE_MODE],
         illegal: '\\S'
+      },
+      {
+        begin: hljs.IDENT_RE + '::'
+      },
+      {
+        begin: '->'
       }
     ]
   };
diff --git a/src/languages/scala.js b/src/languages/scala.js
index 549d6c2..0ac495a 100644
--- a/src/languages/scala.js
+++ b/src/languages/scala.js
@@ -12,6 +12,10 @@ function(hljs) {
     begin: 'u?r?"""', end: '"""',
     relevance: 10
   };
+  var SYMBOL = {
+    className: 'symbol',
+    begin: '\'\\w[\\w\\d_]*(?!\')'
+  };
   return {
     keywords:
       'type yield lazy override def with val var false true sealed abstract private trait ' +
@@ -28,10 +32,12 @@ function(hljs) {
         relevance: 10
       },
       hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE,
-      STRING, hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE,
+      STRING, hljs.QUOTE_STRING_MODE,
+      SYMBOL,
       {
         className: 'class',
-        begin: '((case )?class |object |trait )', end: '({|$)', // beginKeywords won't work because a single "case" shouldn't start this mode
+        begin: '((case )?class |object |trait )', // beginKeywords won't work because a single "case" shouldn't start this mode
+        end: '({|$)', excludeEnd: true,
         illegal: ':',
         keywords: 'case class trait object',
         contains: [
@@ -44,7 +50,7 @@ function(hljs) {
             className: 'params',
             begin: '\\(', end: '\\)',
             contains: [
-              hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, STRING,
+              hljs.QUOTE_STRING_MODE, STRING,
               ANNOTATION
             ]
           }
diff --git a/src/languages/scilab.js b/src/languages/scilab.js
index ae65256..4cb988f 100644
--- a/src/languages/scilab.js
+++ b/src/languages/scilab.js
@@ -17,6 +17,7 @@ function(hljs) {
   ];
 
   return {
+    aliases: ['sci'],
     keywords: {
       keyword: 'abort break case clear catch continue do elseif else endfunction end for function'+
         'global if pause return resume select try then while'+
@@ -40,8 +41,8 @@ function(hljs) {
           {
             className: 'params',
             begin: '\\(', end: '\\)'
-          },
-        ],
+          }
+        ]
       },
       {
         className: 'transposed_variable',
diff --git a/src/languages/scss.js b/src/languages/scss.js
index 82e5583..39d6e24 100644
--- a/src/languages/scss.js
+++ b/src/languages/scss.js
@@ -4,10 +4,16 @@ Author: Kurt Emch <kurt at kurtemch.com>
 */
 function(hljs) {
   var IDENT_RE = '[a-zA-Z-][a-zA-Z0-9_-]*';
+  var VARIABLE = {
+    className: 'variable',
+    begin: '(\\$' + IDENT_RE + ')\\b'
+  };
   var FUNCTION = {
     className: 'function',
-    begin: IDENT_RE + '\\(', end: '\\)',
-    contains: ['self', hljs.NUMBER_MODE, hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE]
+    begin: IDENT_RE + '\\(', 
+    returnBegin: true,
+    excludeEnd: true,
+    end: '\\('
   };
   var HEXCOLOR = {
     className: 'hexcolor', begin: '#[0-9A-Fa-f]+'
@@ -23,7 +29,7 @@ function(hljs) {
       contains: [
         FUNCTION,
         HEXCOLOR,
-        hljs.NUMBER_MODE,
+        hljs.CSS_NUMBER_MODE,
         hljs.QUOTE_STRING_MODE,
         hljs.APOS_STRING_MODE,
         hljs.C_BLOCK_COMMENT_MODE,
@@ -39,11 +45,7 @@ function(hljs) {
     contains: [
       hljs.C_LINE_COMMENT_MODE,
       hljs.C_BLOCK_COMMENT_MODE,
-      {
-        className: 'function',
-        begin: IDENT_RE + '\\(', end: '\\)',
-        contains: ['self', hljs.NUMBER_MODE, hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE]
-      },
+      FUNCTION,
       {
         className: 'id', begin: '\\#[A-Za-z0-9_-]+',
         relevance: 0
@@ -70,6 +72,7 @@ function(hljs) {
         className: 'pseudo',
         begin: '::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)'
       },
+      VARIABLE,
       {
         className: 'attribute',
         begin: '\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|ri [...]
@@ -83,8 +86,10 @@ function(hljs) {
         className: 'value',
         begin: ':', end: ';',
         contains: [
+          FUNCTION,
+          VARIABLE,
           HEXCOLOR,
-          hljs.NUMBER_MODE,
+          hljs.CSS_NUMBER_MODE,
           hljs.QUOTE_STRING_MODE,
           hljs.APOS_STRING_MODE,
           {
@@ -98,10 +103,11 @@ function(hljs) {
         keywords: 'mixin include extend for if else each while charset import debug media page content font-face namespace warn',
         contains: [
           FUNCTION,
+          VARIABLE,
           hljs.QUOTE_STRING_MODE,
           hljs.APOS_STRING_MODE,
           HEXCOLOR,
-          hljs.NUMBER_MODE,
+          hljs.CSS_NUMBER_MODE,
           {
             className: 'preprocessor',
             begin: '\\s[A-Za-z0-9_.-]+',
diff --git a/src/languages/smalltalk.js b/src/languages/smalltalk.js
index 5ff8ab8..77d8967 100644
--- a/src/languages/smalltalk.js
+++ b/src/languages/smalltalk.js
@@ -14,6 +14,7 @@ function(hljs) {
     begin: '#' + hljs.UNDERSCORE_IDENT_RE
   };
   return {
+    aliases: ['st'],
     keywords: 'self super nil true false thisContext', // only 6
     contains: [
       {
diff --git a/src/languages/sql.js b/src/languages/sql.js
index 5998ed4..1fb6cc7 100644
--- a/src/languages/sql.js
+++ b/src/languages/sql.js
@@ -1,39 +1,83 @@
 /*
-Language: SQL
-*/
+ Language: SQL
+ Contributors: Nikolay Lisienko <info at neor.ru>, Heiko August <post at auge8472.de>, Travis Odom <travis.a.odom at gmail.com>
+ */
 
 function(hljs) {
+  var COMMENT_MODE = {
+    className: 'comment',
+    begin: '--', end: '$'
+  };
   return {
     case_insensitive: true,
     illegal: /[<>]/,
     contains: [
       {
         className: 'operator',
-        begin: '\\b(begin|end|start|commit|rollback|savepoint|lock|alter|create|drop|rename|call|delete|do|handler|insert|load|replace|select|truncate|update|set|show|pragma|grant|merge)\\b(?!:)', // negative look-ahead here is specifically to prevent stomping on SmallTalk
-        end: ';', endsWithParent: true,
+        beginKeywords:
+          'begin end start commit rollback savepoint lock alter create drop rename call '+
+          'delete do handler insert load replace select truncate update set show pragma grant '+
+          'merge describe use explain help declare prepare execute deallocate savepoint release '+
+          'unlock purge reset change stop analyze cache flush optimize repair kill '+
+          'install uninstall checksum restore check backup',
+        end: /;/, endsWithParent: true,
         keywords: {
-          keyword: 'all partial global month current_timestamp using go revoke smallint ' +
-            'indicator end-exec disconnect zone with character assertion to add current_user ' +
-            'usage input local alter match collate real then rollback get read timestamp ' +
-            'session_user not integer bit unique day minute desc insert execute like ilike|2 ' +
-            'level decimal drop continue isolation found where constraints domain right ' +
-            'national some module transaction relative second connect escape close system_user ' +
-            'for deferred section cast current sqlstate allocate intersect deallocate numeric ' +
-            'public preserve full goto initially asc no key output collation group by union ' +
-            'session both last language constraint column of space foreign deferrable prior ' +
-            'connection unknown action commit view or first into float year primary cascaded ' +
-            'except restrict set references names table outer open select size are rows from ' +
-            'prepare distinct leading create only next inner authorization schema ' +
-            'corresponding option declare precision immediate else timezone_minute external ' +
-            'varying translation true case exception join hour default double scroll value ' +
-            'cursor descriptor values dec fetch procedure delete and false int is describe ' +
-            'char as at in varchar null trailing any absolute current_time end grant ' +
-            'privileges when cross check write current_date pad begin temporary exec time ' +
-            'update catalog user sql date on identity timezone_hour natural whenever interval ' +
-            'work order cascade diagnostics nchar having left call do handler load replace ' +
-            'truncate start lock show pragma exists number trigger if before after each row ' +
-            'merge matched database',
-          aggregate: 'count sum min max avg'
+          keyword:
+            'abs absolute acos action add adddate addtime aes_decrypt aes_encrypt after aggregate all allocate alter ' +
+            'analyze and any are as asc ascii asin assertion at atan atan2 atn2 authorization authors avg backup ' +
+            'before begin benchmark between bin binlog bit_and bit_count bit_length bit_or bit_xor both by ' +
+            'cache call cascade cascaded case cast catalog ceil ceiling chain change changed char_length ' +
+            'character_length charindex charset check checksum checksum_agg choose close coalesce ' +
+            'coercibility collate collation collationproperty column columns columns_updated commit compress concat ' +
+            'concat_ws concurrent connect connection connection_id consistent constraint constraints continue ' +
+            'contributors conv convert convert_tz corresponding cos cot count count_big crc32 create cross cume_dist ' +
+            'curdate current current_date current_time current_timestamp current_user cursor curtime data database ' +
+            'databases datalength date_add date_format date_sub dateadd datediff datefromparts datename ' +
+            'datepart datetime2fromparts datetimeoffsetfromparts day dayname dayofmonth dayofweek dayofyear ' +
+            'deallocate declare decode default deferrable deferred degrees delayed delete des_decrypt ' +
+            'des_encrypt des_key_file desc describe descriptor diagnostics difference disconnect distinct ' +
+            'distinctrow div do domain double drop dumpfile each else elt enclosed encode encrypt end end-exec ' +
+            'engine engines eomonth errors escape escaped event eventdata events except exception exec execute ' +
+            'exists exp explain export_set extended external extract fast fetch field fields find_in_set ' +
+            'first first_value floor flush for force foreign format found found_rows from from_base64 ' +
+            'from_days from_unixtime full function get get_format get_lock getdate getutcdate global go goto grant ' +
+            'grants greatest group group_concat grouping grouping_id gtid_subset gtid_subtract handler having help ' +
+            'hex high_priority hosts hour ident_current ident_incr ident_seed identified identity if ifnull ignore ' +
+            'iif ilike immediate in index indicator inet6_aton inet6_ntoa inet_aton inet_ntoa infile initially inner ' +
+            'innodb input insert install instr intersect into is is_free_lock is_ipv4 ' +
+            'is_ipv4_compat is_ipv4_mapped is_not is_not_null is_used_lock isdate isnull isolation join key kill ' +
+            'language last last_day last_insert_id last_value lcase lead leading least leaves left len lenght level ' +
+            'like limit lines ln load load_file local localtime localtimestamp locate lock log log10 log2 logfile ' +
+            'logs low_priority lower lpad ltrim make_set makedate maketime master master_pos_wait match matched max ' +
+            'md5 medium merge microsecond mid min minute mod mode module month monthname mutex name_const names ' +
+            'national natural nchar next no no_write_to_binlog not now nullif nvarchar oct ' +
+            'octet_length of old_password on only open optimize option optionally or ord order outer outfile output ' +
+            'pad parse partial partition password patindex percent_rank percentile_cont percentile_disc period_add ' +
+            'period_diff pi plugin position pow power pragma precision prepare preserve primary prior privileges ' +
+            'procedure procedure_analyze processlist profile profiles public publishingservername purge quarter ' +
+            'query quick quote quotename radians rand read references regexp relative relaylog release ' +
+            'release_lock rename repair repeat replace replicate reset restore restrict return returns reverse ' +
+            'revoke right rlike rollback rollup round row row_count rows rpad rtrim savepoint schema scroll ' +
+            'sec_to_time second section select serializable server session session_user set sha sha1 sha2 share ' +
+            'show sign sin size slave sleep smalldatetimefromparts snapshot some soname soundex ' +
+            'sounds_like space sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache ' +
+            'sql_small_result sql_variant_property sqlstate sqrt square start starting status std ' +
+            'stddev stddev_pop stddev_samp stdev stdevp stop str str_to_date straight_join strcmp string stuff ' +
+            'subdate substr substring subtime subtring_index sum switchoffset sysdate sysdatetime sysdatetimeoffset ' +
+            'system_user sysutcdatetime table tables tablespace tan temporary terminated tertiary_weights then time ' +
+            'time_format time_to_sec timediff timefromparts timestamp timestampadd timestampdiff timezone_hour ' +
+            'timezone_minute to to_base64 to_days to_seconds todatetimeoffset trailing transaction translation ' +
+            'trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse ucase uncompress ' +
+            'uncompressed_length unhex unicode uninstall union unique unix_timestamp unknown unlock update upgrade ' +
+            'upped upper usage use user user_resources using utc_date utc_time utc_timestamp uuid uuid_short ' +
+            'validate_password_strength value values var var_pop var_samp variables variance varp ' +
+            'version view warnings week weekday weekofyear weight_string when whenever where with work write xml ' +
+            'xor year yearweek zon',
+          literal:
+            'true false null',
+          built_in:
+            'array bigint binary bit blob boolean char character date dec decimal float int integer interval number ' +
+            'numeric real serial smallint varchar varying int8 serial8 text'
         },
         contains: [
           {
@@ -51,14 +95,13 @@ function(hljs) {
             begin: '`', end: '`',
             contains: [hljs.BACKSLASH_ESCAPE]
           },
-          hljs.C_NUMBER_MODE
+          hljs.C_NUMBER_MODE,
+          hljs.C_BLOCK_COMMENT_MODE,
+          COMMENT_MODE
         ]
       },
       hljs.C_BLOCK_COMMENT_MODE,
-      {
-        className: 'comment',
-        begin: '--', end: '$'
-      }
+      COMMENT_MODE
     ]
   };
 }
diff --git a/src/languages/swift.js b/src/languages/swift.js
new file mode 100644
index 0000000..a62c221
--- /dev/null
+++ b/src/languages/swift.js
@@ -0,0 +1,111 @@
+/*
+Language: Swift
+Author: Chris Eidhof <chris at eidhof.nl>
+Contributors: Nate Cook <natecook at gmail.com>
+*/
+
+
+function(hljs) {
+  var SWIFT_KEYWORDS = {
+      keyword: 'class deinit enum extension func import init let protocol static ' +
+        'struct subscript typealias var break case continue default do ' +
+        'else fallthrough if in for return switch where while as dynamicType ' +
+        'is new super self Self Type __COLUMN__ __FILE__ __FUNCTION__ ' +
+        '__LINE__ associativity didSet get infix inout left mutating none ' +
+        'nonmutating operator override postfix precedence prefix right set '+
+        'unowned unowned safe unsafe weak willSet',
+      literal: 'true false nil',
+      built_in: 'abs advance alignof alignofValue assert bridgeFromObjectiveC ' +
+        'bridgeFromObjectiveCUnconditional bridgeToObjectiveC ' +
+        'bridgeToObjectiveCUnconditional c contains count countElements ' +
+        'countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump ' +
+        'encodeBitsAsWords enumerate equal false filter find getBridgedObjectiveCType ' +
+        'getVaList indices insertionSort isBridgedToObjectiveC ' +
+        'isBridgedVerbatimToObjectiveC isUniquelyReferenced join ' +
+        'lexicographicalCompare map max maxElement min minElement nil numericCast ' +
+        'partition posix print println quickSort reduce reflect reinterpretCast ' +
+        'reverse roundUpToAlignment sizeof sizeofValue sort split startsWith strideof ' +
+        'strideofValue swap swift toString transcode true underestimateCount ' +
+        'unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer ' +
+        'withUnsafePointerToObject withUnsafePointers withVaList'
+    };
+
+  var TYPE = {
+    className: 'type',
+    begin: '\\b[A-Z][\\w\']*',
+    relevance: 0
+  };
+  var BLOCK_COMMENT = {
+    className: 'comment',
+    begin: '/\\*', end: '\\*/',
+    contains: [hljs.PHRASAL_WORDS_MODE, 'self']
+  };
+  var SUBST = {
+    className: 'subst',
+    begin: /\\\(/, end: '\\)',
+    keywords: SWIFT_KEYWORDS,
+    contains: [] // assigned later
+  };
+  var NUMBERS = {
+      className: 'number',
+      begin: '\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b',
+      relevance: 0
+  };
+  var QUOTE_STRING_MODE = hljs.inherit(hljs.QUOTE_STRING_MODE, {
+    contains: [SUBST, hljs.BACKSLASH_ESCAPE]
+  });
+  SUBST.contains = [NUMBERS];
+
+  return {
+    keywords: SWIFT_KEYWORDS,
+    contains: [
+      QUOTE_STRING_MODE,
+      hljs.C_LINE_COMMENT_MODE,
+      BLOCK_COMMENT,
+      TYPE,
+      NUMBERS,
+      {
+        className: 'func',
+        beginKeywords: 'func', excludeEnd: true,
+        contains: [
+          hljs.inherit(hljs.TITLE_MODE, {
+            begin: /[A-Za-z$_][0-9A-Za-z$_]*/,
+            illegal: /\(/
+          }),
+          {
+            className: 'generics',
+            begin: /\</, end: /\>/,
+            illegal: /\>/
+          },
+          {
+            className: 'params',
+            begin: /\(/, end: /\)/,
+            contains: [
+              hljs.C_LINE_COMMENT_MODE,
+              hljs.C_BLOCK_COMMENT_MODE
+            ],
+            illegal: /["']/
+          }
+        ],
+        illegal: /\[|%/
+      },
+      {
+        className: 'class',
+        keywords: 'struct protocol class extension enum',
+        begin: '(struct|protocol|class(?! (func|var))|extension|enum)',
+        end: '\\{',
+        excludeEnd: true,
+        contains: [
+          hljs.inherit(hljs.TITLE_MODE, {begin: /[A-Za-z$_][0-9A-Za-z$_]*/})
+        ]
+      },
+      {
+        className: 'preprocessor', // @attributes
+        begin: '(@assignment|@class_protocol|@exported|@final|@lazy|@noreturn|' +
+                  '@NSCopying|@NSManaged|@objc|@optional|@required|@auto_closure|' +
+                  '@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|' +
+                  '@infix|@prefix|@postfix)'
+      },
+    ]
+  };
+}
diff --git a/src/languages/thrift.js b/src/languages/thrift.js
new file mode 100644
index 0000000..cfc6456
--- /dev/null
+++ b/src/languages/thrift.js
@@ -0,0 +1,41 @@
+/*
+Language: Thrift
+Author: Oleg Efimov <efimovov at gmail.com>
+Description: Thrift message definition format
+*/
+
+function(hljs) {
+  var BUILT_IN_TYPES = 'bool byte i16 i32 i64 double string binary';
+  return {
+    keywords: {
+      keyword:
+        'namespace const typedef struct enum service exception void oneway set list map required optional',
+      built_in:
+        BUILT_IN_TYPES,
+      literal:
+        'true false'
+    },
+    contains: [
+      hljs.QUOTE_STRING_MODE,
+      hljs.NUMBER_MODE,
+      hljs.C_LINE_COMMENT_MODE,
+      hljs.C_BLOCK_COMMENT_MODE,
+      {
+        className: 'class',
+        beginKeywords: 'struct enum service exception', end: /\{/,
+        illegal: /\n/,
+        contains: [
+          hljs.inherit(hljs.TITLE_MODE, {
+            starts: {endsWithParent: true, excludeEnd: true} // hack: eating everything after the first title
+          })
+        ]
+      },
+      {
+        className: 'stl_container',
+        begin: '\\b(set|list|map)\\s*<', end: '>',
+        keywords: BUILT_IN_TYPES,
+        contains: ['self']
+      }
+    ]
+  };
+}
diff --git a/src/languages/javascript.js b/src/languages/typescript.js
similarity index 67%
copy from src/languages/javascript.js
copy to src/languages/typescript.js
index 8dd0a7a..60fe563 100644
--- a/src/languages/javascript.js
+++ b/src/languages/typescript.js
@@ -1,15 +1,18 @@
 /*
-Language: JavaScript
+Language: TypeScript
+Author: Panu Horsmalahti <panu.horsmalahti at iki.fi>
+Description: TypeScript is a strict superset of JavaScript
 */
 
 function(hljs) {
   return {
-    aliases: ['js'],
+    aliases: ['ts'],
     keywords: {
       keyword:
-        'in if for while finally var new function do return void else break catch ' +
+        'in if for while finally var new function|0 do return void else break catch ' +
         'instanceof with throw case default try this switch continue typeof delete ' +
-        'let yield const class',
+        'let yield const class public private get set super interface extends' +
+        'static constructor implements enum export import declare',
       literal:
         'true false null undefined NaN Infinity',
       built_in:
@@ -18,13 +21,14 @@ function(hljs) {
         'EvalError InternalError RangeError ReferenceError StopIteration SyntaxError ' +
         'TypeError URIError Number Math Date String RegExp Array Float32Array ' +
         'Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array ' +
-        'Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require'
+        'Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require ' +
+        'module console window document any number boolean string void',
     },
     contains: [
       {
         className: 'pi',
         begin: /^\s*('|")use strict('|")/,
-        relevance: 10
+        relevance: 0
       },
       hljs.APOS_STRING_MODE,
       hljs.QUOTE_STRING_MODE,
@@ -48,7 +52,7 @@ function(hljs) {
       },
       {
         className: 'function',
-        beginKeywords: 'function', end: /\{/,
+        beginKeywords: 'function', end: /\{/, excludeEnd: true,
         contains: [
           hljs.inherit(hljs.TITLE_MODE, {begin: /[A-Za-z$_][0-9A-Za-z$_]*/}),
           {
@@ -61,7 +65,21 @@ function(hljs) {
             illegal: /["'\(]/
           }
         ],
-        illegal: /\[|%/
+        illegal: /\[|%/,
+        relevance: 0 // () => {} is more typical in TypeScript
+      },
+      {
+        className: 'constructor',
+        beginKeywords: 'constructor', end: /\{/, excludeEnd: true,
+        relevance: 10
+      },
+      {
+        className: 'module',
+        beginKeywords: 'module', end: /\{/, excludeEnd: true,
+      },
+      {
+        className: 'interface',
+        beginKeywords: 'interface', end: /\{/, excludeEnd: true,
       },
       {
         begin: /\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
diff --git a/src/languages/vala.js b/src/languages/vala.js
index 70a2571..2f30681 100644
--- a/src/languages/vala.js
+++ b/src/languages/vala.js
@@ -29,7 +29,7 @@ function(hljs) {
     contains: [
       {
         className: 'class',
-        beginKeywords: 'class interface delegate namespace', end: '{',
+        beginKeywords: 'class interface delegate namespace', end: '{', excludeEnd: true,
         illegal: '[^,:\\n\\s\\.]',
         contains: [
           hljs.UNDERSCORE_TITLE_MODE
diff --git a/src/languages/vbnet.js b/src/languages/vbnet.js
index 933ff8a..db9894f 100644
--- a/src/languages/vbnet.js
+++ b/src/languages/vbnet.js
@@ -5,6 +5,7 @@ Author: Poren Chiang <ren.chiang at gmail.com>
 
 function(hljs) {
   return {
+    aliases: ['vb'],
     case_insensitive: true,
     keywords: {
       keyword:
@@ -40,7 +41,7 @@ function(hljs) {
           {
             className: 'xmlDocTag',
             begin: '</?', end: '>'
-          },
+          }
           ]
       },
       hljs.C_NUMBER_MODE,
@@ -48,7 +49,7 @@ function(hljs) {
         className: 'preprocessor',
         begin: '#', end: '$',
         keywords: 'if else elseif end region externalsource'
-      },
+      }
     ]
   };
 }
diff --git a/src/languages/vbscript.js b/src/languages/vbscript.js
index 8adba25..d13df32 100644
--- a/src/languages/vbscript.js
+++ b/src/languages/vbscript.js
@@ -6,6 +6,7 @@ Contributors: Michal Gabrukiewicz <mgabru at gmail.com>
 
 function(hljs) {
   return {
+    aliases: ['vbs'],
     case_insensitive: true,
     keywords: {
       keyword:
diff --git a/src/languages/vim.js b/src/languages/vim.js
new file mode 100644
index 0000000..5445a9f
--- /dev/null
+++ b/src/languages/vim.js
@@ -0,0 +1,68 @@
+/*
+Language: Vim Script
+Author: Jun Yang <yangjvn at 126.com>
+Description: full keyword and built-in from http://vimdoc.sourceforge.net/htmldoc/
+*/
+
+function(hljs) {
+  return {
+    lexemes: /[!#@\w]+/,
+    keywords: {
+      keyword: //ex command
+        // express version except: ! & * < = > !! # @ @@
+        'N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope '+
+        'cp cpf cq cr cs cst cu cuna cunme cw d|0 delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu g|0 go gr grepa gu gv ha h|0 helpf helpg helpt hi hid his i|0 ia iabc if ij il im imapc '+
+        'ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs n|0 new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome [...]
+        'profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf q|0 quita qa r|0 rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv s|0 sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor '+
+        'so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync t|0 tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew '+
+        'tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up v|0 ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ '+
+        // full version
+        'Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload '+
+        'bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap '+
+        'cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor '+
+        'endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap '+
+        'imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview '+
+        'lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap '+
+        'nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext '+
+        'ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding '+
+        'scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace '+
+        'startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious '+'trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view  [...]
+        'vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank',
+      built_in: //built in func
+        'abs acos add and append argc argidx argv asin atan atan2 browse browsedir bufexists buflisted bufloaded bufname bufnr bufwinnr byte2line byteidx call ceil changenr char2nr cindent clearmatches col complete complete_add complete_check confirm copy cos cosh count cscope_connection cursor '+
+        'deepcopy delete did_filetype diff_filler diff_hlID empty escape eval eventhandler executable exists exp expand extend feedkeys filereadable filewritable filter finddir findfile float2nr floor fmod fnameescape fnamemodify foldclosed foldclosedend foldlevel foldtext foldtextresult foreground function '+
+        'garbagecollect get getbufline getbufvar getchar getcharmod getcmdline getcmdpos getcmdtype getcwd getfontname getfperm getfsize getftime getftype getline getloclist getmatches getpid getpos getqflist getreg getregtype gettabvar gettabwinvar getwinposx getwinposy getwinvar glob globpath has has_key '+
+        'haslocaldir hasmapto histadd histdel histget histnr hlexists hlID hostname iconv indent index input inputdialog inputlist inputrestore inputsave inputsecret insert invert isdirectory islocked items join keys len libcall libcallnr line line2byte lispindent localtime log log10 luaeval map maparg mapcheck '+
+        'match matchadd matcharg matchdelete matchend matchlist matchstr max min mkdir mode mzeval nextnonblank nr2char or pathshorten pow prevnonblank printf pumvisible py3eval pyeval range readfile reltime reltimestr remote_expr remote_foreground remote_peek remote_read remote_send remove rename repeat '+
+        'resolve reverse round screenattr screenchar screencol screenrow search searchdecl searchpair searchpairpos searchpos server2client serverlist setbufvar setcmdpos setline setloclist setmatches setpos setqflist setreg settabvar settabwinvar setwinvar sha256 shellescape shiftwidth simplify sin '+
+        'sinh sort soundfold spellbadword spellsuggest split sqrt str2float str2nr strchars strdisplaywidth strftime stridx string strlen strpart strridx strtrans strwidth submatch substitute synconcealed synID synIDattr '+
+        'synIDtrans synstack system tabpagebuflist tabpagenr tabpagewinnr tagfiles taglist tan tanh tempname tolower toupper tr trunc type undofile undotree values virtcol visualmode wildmenumode winbufnr wincol winheight winline winnr winrestcmd winrestview winsaveview winwidth writefile xor'
+    },
+    illegal: /[{:]/,
+    contains: [
+      hljs.NUMBER_MODE,
+      hljs.APOS_STRING_MODE,
+      {
+        className: 'string',
+        // quote with escape, comment as quote
+        begin: /"((\\")|[^"\n])*("|\n)/
+      },
+      {
+        className: 'variable',
+        begin: /[bwtglsav]:[\w\d_]*/
+      },
+      {
+        className: 'function',
+        beginKeywords: 'function function!', end: '$',
+        relevance: 0,
+        contains: [
+          hljs.TITLE_MODE,
+          {
+            className: 'params',
+            begin: '\\(', end: '\\)'
+          }
+        ]
+      }
+    ]
+  };
+}
diff --git a/src/languages/x86asm.js b/src/languages/x86asm.js
new file mode 100644
index 0000000..820e3a1
--- /dev/null
+++ b/src/languages/x86asm.js
@@ -0,0 +1,152 @@
+/*
+Language: Intel x86 Assembly
+Author: innocenat <innocenat at gmail.com>
+Description: x86 assembly language using Intel's mnemonic and NASM syntax
+*/
+
+function(hljs) {
+  return {
+    case_insensitive: true,
+    lexemes: '\\.?' + hljs.IDENT_RE,
+    keywords: {
+      keyword:
+        'lock rep repe repz repne repnz xaquire xrelease bnd nobnd ' +
+        'aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd fic [...]
+      literal:
+        // Instruction pointer
+        'ip eip rip ' +
+        // 8-bit registers
+        'al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ' +
+        // 16-bit registers
+        'ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w ' +
+        // 32-bit registers
+        'eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d ' +
+        // 64-bit registers
+        'rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 ' +
+        // Segment registers
+        'cs ds es fs gs ss ' +
+        // Floating point stack registers
+        'st st0 st1 st2 st3 st4 st5 st6 st7 ' +
+        // MMX Registers
+        'mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 ' +
+        // SSE registers
+        'xmm0  xmm1  xmm2  xmm3  xmm4  xmm5  xmm6  xmm7  xmm8  xmm9 xmm10  xmm11 xmm12 xmm13 xmm14 xmm15 ' +
+        'xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ' +
+        // AVX registers
+        'ymm0  ymm1  ymm2  ymm3  ymm4  ymm5  ymm6  ymm7  ymm8  ymm9 ymm10  ymm11 ymm12 ymm13 ymm14 ymm15 ' +
+        'ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 ' +
+        // AVX-512F registers
+        'zmm0  zmm1  zmm2  zmm3  zmm4  zmm5  zmm6  zmm7  zmm8  zmm9 zmm10  zmm11 zmm12 zmm13 zmm14 zmm15 ' +
+        'zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 ' +
+        // AVX-512F mask registers
+        'k0 k1 k2 k3 k4 k5 k6 k7 ' +
+        // Bound (MPX) register
+        'bnd0 bnd1 bnd2 bnd3 ' +
+        // Special register
+        'cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 ' +
+        // NASM altreg package
+        'r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b ' +
+        'r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d ' +
+        'r0h r1h r2h r3h ' +
+        'r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l',
+
+      pseudo:
+        'db dw dd dq dt ddq do dy dz ' +
+        'resb resw resd resq rest resdq reso resy resz ' +
+        'incbin equ times',
+
+      preprocessor:
+        '%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif ' +
+        '%ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep ' +
+        '%endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment ' +
+        '.nolist ' +
+        'byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr ' +
+        '__FILE__ __LINE__ __SECT__  __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ ' +
+        '__UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__  __PASS__ struc endstruc istruc at iend ' +
+        'align alignb sectalign daz nodaz up down zero default option assume public ',
+
+      built_in:
+        'bits use16 use32 use64 default section segment absolute extern global common cpu float ' +
+        '__utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ ' +
+        '__float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ ' +
+        '__Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e ' +
+        'float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__'
+    },
+    contains: [
+      {
+        className: 'comment',
+        begin: ';',
+        end: '$',
+        relevance: 0
+      },
+      // Float number and x87 BCD
+      {
+        className: 'number',
+        begin: '\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|(0[Xx])?[0-9][0-9_]*\\.?[0-9_]*(?:[pP](?:[+-]?[0-9_]+)?)?)\\b',
+        relevance: 0
+      },
+      // Hex number in $
+      {
+        className: 'number',
+        begin: '\\$[0-9][0-9A-Fa-f]*',
+        relevance: 0
+      },
+      // Number in H,X,D,T,Q,O,B,Y suffix
+      {
+        className: 'number',
+        begin: '\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[HhXx]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b'
+      },
+      // Number in H,X,D,T,Q,O,B,Y prefix
+      {
+        className: 'number',
+        begin: '\\b(?:0[HhXx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b'
+      },
+      // Double quote string
+      hljs.QUOTE_STRING_MODE,
+      // Single-quoted string
+      {
+        className: 'string',
+        begin: '\'',
+        end: '[^\\\\]\'',
+        relevance: 0
+      },
+      // Backquoted string
+      {
+        className: 'string',
+        begin: '`',
+        end: '[^\\\\]`',
+        relevance: 0
+      },
+      // Section name
+      {
+        className: 'string',
+        begin: '\\.[A-Za-z0-9]+',
+        relevance: 0
+      },
+      // Global label and local label
+      {
+        className: 'label',
+        begin: '^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)',
+        relevance: 0
+      },
+      // Macro-local label
+      {
+        className: 'label',
+        begin: '^\\s*%%[A-Za-z0-9_$#@~.?]*:',
+        relevance: 0
+      },
+      // Macro parameter
+      {
+        className: 'argument',
+        begin: '%[0-9]+',
+        relevance: 0
+      },
+      // Macro parameter
+      {
+        className: 'built_in',
+        begin: '%!\S+',
+        relevance: 0
+      }
+    ]
+  };
+}
diff --git a/src/languages/xml.js b/src/languages/xml.js
index 092b555..2e68478 100644
--- a/src/languages/xml.js
+++ b/src/languages/xml.js
@@ -36,7 +36,7 @@ function(hljs) {
     ]
   };
   return {
-    aliases: ['html'],
+    aliases: ['html', 'xhtml', 'rss', 'atom', 'xsl', 'plist'],
     case_insensitive: true,
     contains: [
       {
diff --git a/src/package.json b/src/package.json
index 64ea03e..4781f6a 100644
--- a/src/package.json
+++ b/src/package.json
@@ -2,7 +2,7 @@
 , "description" : "Syntax highlighting with language autodetection."
 , "keywords" : ["highlight", "syntax"]
 , "homepage" : "http://highlightjs.org/"
-, "version" : "8.0.0"
+, "version" : "8.1.0"
 , "author" :
   { "name": "Ivan Sagalaev"
   , "email": "maniac at softwaremaniacs.org"
diff --git a/src/styles/arta.css b/src/styles/arta.css
index 02db86a..b8ed3db 100644
--- a/src/styles/arta.css
+++ b/src/styles/arta.css
@@ -3,16 +3,16 @@ Date: 17.V.2011
 Author: pumbur <pumbur at pumbur.net>
 */
 
-.hljs
-{
-  display: block; padding: 0.5em;
+.hljs {
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
   background: #222;
 }
 
 .profile .hljs-header *,
 .ini .hljs-title,
-.nginx .hljs-title
-{
+.nginx .hljs-title {
   color: #fff;
 }
 
@@ -29,8 +29,7 @@ Author: pumbur <pumbur at pumbur.net>
 .hljs-tag,
 .hljs-template_comment,
 .css .hljs-rules,
-.tex .hljs-special
-{
+.tex .hljs-special {
   color: #444;
 }
 
@@ -43,14 +42,12 @@ Author: pumbur <pumbur at pumbur.net>
 .xml .hljs-value,
 .ini .hljs-value,
 .clojure .hljs-attribute,
-.coffeescript .hljs-attribute
-{
+.coffeescript .hljs-attribute {
   color: #ffcc33;
 }
 
 .hljs-number,
-.hljs-addition
-{
+.hljs-addition {
   color: #00cc66;
 }
 
@@ -71,9 +68,8 @@ Author: pumbur <pumbur at pumbur.net>
 .hljs-important,
 .hljs-flow,
 .hljs-inheritance,
-.parser3 .hljs-variable
-{
-  color: #32AAEE;
+.parser3 .hljs-variable {
+  color: #32aaee;
 }
 
 .hljs-keyword,
@@ -88,8 +84,7 @@ Author: pumbur <pumbur at pumbur.net>
 .hljs-winutils,
 .tex .hljs-command,
 .hljs-request,
-.hljs-status
-{
+.hljs-status {
   color: #6644aa;
 }
 
@@ -114,8 +109,7 @@ Author: pumbur <pumbur at pumbur.net>
 .tail,
 .avrasm .hljs-label,
 .tex .hljs-formula,
-.tex .hljs-formula *
-{
+.tex .hljs-formula * {
   color: #bb1166;
 }
 
@@ -124,8 +118,7 @@ Author: pumbur <pumbur at pumbur.net>
 .profile .hljs-header,
 .ini .hljs-title,
 .apache .hljs-tag,
-.parser3 .hljs-title
-{
+.parser3 .hljs-title {
   font-weight: bold;
 }
 
@@ -135,26 +128,14 @@ Author: pumbur <pumbur at pumbur.net>
 .xml .javascript,
 .xml .vbscript,
 .xml .css,
-.xml .hljs-cdata
-{
+.xml .hljs-cdata {
   opacity: 0.6;
 }
 
 .hljs,
-.javascript,
-.css,
-.xml,
 .hljs-subst,
 .diff .hljs-chunk,
 .css .hljs-value,
-.css .hljs-attribute,
-.lisp .hljs-string,
-.lisp .hljs-number,
-.tail .hljs-params,
-.hljs-container,
-.haskell *,
-.erlang *,
-.erlang_repl *
-{
+.css .hljs-attribute {
   color: #aaa;
 }
diff --git a/src/styles/ascetic.css b/src/styles/ascetic.css
index 031c88a..7b87f6f 100644
--- a/src/styles/ascetic.css
+++ b/src/styles/ascetic.css
@@ -5,8 +5,11 @@ Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac at SoftwareManiac
 */
 
 .hljs {
-  display: block; padding: 0.5em;
-  background: white; color: black;
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
+  background: white;
+  color: black;
 }
 
 .hljs-string,
@@ -29,7 +32,7 @@ Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac at SoftwareManiac
 .hljs-javadoc,
 .hljs-deletion,
 .apache .hljs-sqbracket {
-  color: #CCC;
+  color: #ccc;
 }
 
 .hljs-keyword,
diff --git a/src/styles/atelier-dune.dark.css b/src/styles/atelier-dune.dark.css
index 2779601..d27ce9b 100644
--- a/src/styles/atelier-dune.dark.css
+++ b/src/styles/atelier-dune.dark.css
@@ -1,5 +1,5 @@
 /* Base16 Atelier Dune Dark - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ 
+/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
 /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
 /* https://github.com/jmblog/color-themes-for-highlightjs */
 
@@ -77,6 +77,7 @@
 
 .hljs {
   display: block;
+  overflow-x: auto;
   background: #292824;
   color: #a6a28c;
   padding: 0.5em;
diff --git a/src/styles/atelier-dune.light.css b/src/styles/atelier-dune.light.css
index 11c7423..d200c0b 100644
--- a/src/styles/atelier-dune.light.css
+++ b/src/styles/atelier-dune.light.css
@@ -1,5 +1,5 @@
 /* Base16 Atelier Dune Light - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ 
+/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
 /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
 /* https://github.com/jmblog/color-themes-for-highlightjs */
 
@@ -77,6 +77,7 @@
 
 .hljs {
   display: block;
+  overflow-x: auto;
   background: #fefbec;
   color: #6e6b5e;
   padding: 0.5em;
diff --git a/src/styles/atelier-forest.dark.css b/src/styles/atelier-forest.dark.css
index c1f7211..370b66d 100644
--- a/src/styles/atelier-forest.dark.css
+++ b/src/styles/atelier-forest.dark.css
@@ -1,5 +1,5 @@
 /* Base16 Atelier Forest Dark - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */ 
+/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */
 /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
 /* https://github.com/jmblog/color-themes-for-highlightjs */
 
@@ -77,6 +77,7 @@
 
 .hljs {
   display: block;
+  overflow-x: auto;
   background: #2c2421;
   color: #a8a19f;
   padding: 0.5em;
diff --git a/src/styles/atelier-forest.light.css b/src/styles/atelier-forest.light.css
index 806ba73..4ae2af8 100644
--- a/src/styles/atelier-forest.light.css
+++ b/src/styles/atelier-forest.light.css
@@ -1,5 +1,5 @@
 /* Base16 Atelier Forest Light - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */ 
+/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */
 /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
 /* https://github.com/jmblog/color-themes-for-highlightjs */
 
@@ -77,6 +77,7 @@
 
 .hljs {
   display: block;
+  overflow-x: auto;
   background: #f1efee;
   color: #68615e;
   padding: 0.5em;
diff --git a/src/styles/atelier-heath.dark.css b/src/styles/atelier-heath.dark.css
index 3670669..87bcda0 100644
--- a/src/styles/atelier-heath.dark.css
+++ b/src/styles/atelier-heath.dark.css
@@ -1,5 +1,5 @@
 /* Base16 Atelier Heath Dark - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */ 
+/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */
 /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
 /* https://github.com/jmblog/color-themes-for-highlightjs */
 
@@ -77,6 +77,7 @@
 
 .hljs {
   display: block;
+  overflow-x: auto;
   background: #292329;
   color: #ab9bab;
   padding: 0.5em;
diff --git a/src/styles/atelier-heath.light.css b/src/styles/atelier-heath.light.css
index e73a0b8..07fa895 100644
--- a/src/styles/atelier-heath.light.css
+++ b/src/styles/atelier-heath.light.css
@@ -1,5 +1,5 @@
 /* Base16 Atelier Heath Light - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */ 
+/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */
 /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
 /* https://github.com/jmblog/color-themes-for-highlightjs */
 
@@ -77,6 +77,7 @@
 
 .hljs {
   display: block;
+  overflow-x: auto;
   background: #f7f3f7;
   color: #695d69;
   padding: 0.5em;
diff --git a/src/styles/atelier-lakeside.dark.css b/src/styles/atelier-lakeside.dark.css
index 8506246..10f2b30 100644
--- a/src/styles/atelier-lakeside.dark.css
+++ b/src/styles/atelier-lakeside.dark.css
@@ -1,5 +1,5 @@
 /* Base16 Atelier Lakeside Dark - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/) */ 
+/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/) */
 /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
 /* https://github.com/jmblog/color-themes-for-highlightjs */
 
@@ -77,6 +77,7 @@
 
 .hljs {
   display: block;
+  overflow-x: auto;
   background: #1f292e;
   color: #7ea2b4;
   padding: 0.5em;
diff --git a/src/styles/atelier-lakeside.light.css b/src/styles/atelier-lakeside.light.css
index 006ae6d..749049a 100644
--- a/src/styles/atelier-lakeside.light.css
+++ b/src/styles/atelier-lakeside.light.css
@@ -1,5 +1,5 @@
 /* Base16 Atelier Lakeside Light - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/) */ 
+/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/) */
 /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
 /* https://github.com/jmblog/color-themes-for-highlightjs */
 
@@ -77,6 +77,7 @@
 
 .hljs {
   display: block;
+  overflow-x: auto;
   background: #ebf8ff;
   color: #516d7b;
   padding: 0.5em;
diff --git a/src/styles/atelier-seaside.dark.css b/src/styles/atelier-seaside.dark.css
index cbea6ed..94a3cdb 100644
--- a/src/styles/atelier-seaside.dark.css
+++ b/src/styles/atelier-seaside.dark.css
@@ -1,5 +1,5 @@
 /* Base16 Atelier Seaside Dark - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/) */ 
+/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/) */
 /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
 /* https://github.com/jmblog/color-themes-for-highlightjs */
 
@@ -77,6 +77,7 @@
 
 .hljs {
   display: block;
+  overflow-x: auto;
   background: #242924;
   color: #8ca68c;
   padding: 0.5em;
diff --git a/src/styles/atelier-seaside.light.css b/src/styles/atelier-seaside.light.css
index 159121e..28f187c 100644
--- a/src/styles/atelier-seaside.light.css
+++ b/src/styles/atelier-seaside.light.css
@@ -1,5 +1,5 @@
 /* Base16 Atelier Seaside Light - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/) */ 
+/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/) */
 /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
 /* https://github.com/jmblog/color-themes-for-highlightjs */
 
@@ -77,6 +77,7 @@
 
 .hljs {
   display: block;
+  overflow-x: auto;
   background: #f0fff0;
   color: #5e6e5e;
   padding: 0.5em;
diff --git a/src/styles/brown_paper.css b/src/styles/brown_paper.css
index f9541c3..73fee33 100644
--- a/src/styles/brown_paper.css
+++ b/src/styles/brown_paper.css
@@ -5,7 +5,9 @@ Brown Paper style from goldblog.com.ua (c) Zaripov Yura <yur4ik7 at ukr.net>
 */
 
 .hljs {
-  display: block; padding: 0.5em;
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
   background:#b7a68e url(./brown_papersq.png);
 }
 
@@ -27,7 +29,7 @@ Brown Paper style from goldblog.com.ua (c) Zaripov Yura <yur4ik7 at ukr.net>
 .hljs,
 .hljs-subst,
 .hljs-tag .hljs-keyword {
-  color: #363C69;
+  color: #363c69;
 }
 
 .hljs-string,
@@ -41,7 +43,6 @@ Brown Paper style from goldblog.com.ua (c) Zaripov Yura <yur4ik7 at ukr.net>
 .ruby .hljs-symbol .hljs-string,
 .ruby .hljs-class .hljs-parent,
 .hljs-built_in,
-.sql .hljs-aggregate,
 .django .hljs-template_tag,
 .django .hljs-variable,
 .smalltalk .hljs-class,
@@ -58,7 +59,7 @@ Brown Paper style from goldblog.com.ua (c) Zaripov Yura <yur4ik7 at ukr.net>
 .apache .hljs-tag,
 .apache .hljs-cbracket,
 .tex .hljs-number {
-  color: #2C009F;
+  color: #2c009f;
 }
 
 .hljs-comment,
@@ -82,7 +83,6 @@ Brown Paper style from goldblog.com.ua (c) Zaripov Yura <yur4ik7 at ukr.net>
 .hljs-title,
 .haskell .hljs-type,
 .vbscript .hljs-built_in,
-.sql .hljs-aggregate,
 .rsl .hljs-built_in,
 .smalltalk .hljs-class,
 .diff .hljs-header,
diff --git a/src/styles/codepen-embed.css b/src/styles/codepen-embed.css
new file mode 100644
index 0000000..0526730
--- /dev/null
+++ b/src/styles/codepen-embed.css
@@ -0,0 +1,107 @@
+/*
+  codepen.io Embed Theme
+  Author: Justin Perry <http://github.com/ourmaninamsterdam>
+  Original theme - https://github.com/chriskempson/tomorrow-theme
+*/
+
+.hljs {
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
+  background: #222;
+  color: #fff;
+  font-family: Menlo, Monaco, 'Andale Mono', 'Lucida Console', 'Courier New', monospace;
+}
+
+.hljs-comment,
+.hljs-title {
+  color: #777;
+}
+
+.hljs-variable,
+.hljs-attribute,
+.hljs-tag,
+.hljs-regexp,
+.ruby .constant,
+.xml .tag .title,
+.xml .pi,
+.xml .doctype,
+.html .doctype {
+  color: #ab875d;
+}
+
+.css .value {
+  color: #cd6a51;
+}
+
+.css .value .function,
+.css .value .string {
+  color: #a67f59;
+}
+
+.css .value .number {
+  color: #9b869c;
+}
+
+.css .id,
+.css .class,
+.css-pseudo,
+.css .selector,
+.css .tag {
+  color: #dfc48c;
+}
+
+.hljs-number,
+.hljs-preprocessor,
+.hljs-built_in,
+.hljs-literal,
+.hljs-params,
+.hljs-constant {
+  color: #ab875d;
+}
+
+.ruby .class .title,
+.css .rules .attribute {
+  color: #9b869b;
+}
+
+.hljs-string,
+.hljs-value,
+.hljs-inheritance,
+.hljs-header,
+.ruby .symbol,
+.xml .cdata {
+  color: #8f9c6c;
+}
+
+.css .hexcolor {
+  color: #cd6a51;
+}
+
+.function,
+.python .decorator,
+.python .title,
+.ruby .function .title,
+.ruby .title .keyword,
+.perl .sub,
+.javascript .title,
+.coffeescript .title {
+  color: #fff;
+}
+
+.hljs-keyword,
+.javascript .function {
+  color: #8f9c6c;
+}
+
+.coffeescript .javascript,
+.javascript,
+.javascript .xml,
+.tex .formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .cdata {
+    background: transparent;
+    opacity: 1;
+}
diff --git a/src/styles/default.css b/src/styles/color-brewer.css
similarity index 83%
copy from src/styles/default.css
copy to src/styles/color-brewer.css
index 3d8485b..8cb392f 100644
--- a/src/styles/default.css
+++ b/src/styles/color-brewer.css
@@ -1,12 +1,16 @@
 /*
 
-Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac at SoftwareManiacs.Org>
+Colorbrewer theme
+Original: https://github.com/mbostock/colorbrewer-theme (c) Mike Bostock <mike at ocks.org>
+Ported by Fabrício Tavares de Oliveira
 
 */
 
 .hljs {
-  display: block; padding: 0.5em;
-  background: #F0F0F0;
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
+  background: #fff;
 }
 
 .hljs,
@@ -15,7 +19,7 @@ Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac at SoftwareManiac
 .lisp .hljs-title,
 .clojure .hljs-built_in,
 .nginx .hljs-title {
-  color: black;
+  color: #000;
 }
 
 .hljs-string,
@@ -24,13 +28,11 @@ Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac at SoftwareManiac
 .hljs-parent,
 .hljs-tag .hljs-value,
 .hljs-rules .hljs-value,
-.hljs-rules .hljs-value .hljs-number,
 .hljs-preprocessor,
 .hljs-pragma,
 .haml .hljs-symbol,
 .ruby .hljs-symbol,
 .ruby .hljs-symbol .hljs-string,
-.hljs-aggregate,
 .hljs-template_tag,
 .django .hljs-variable,
 .smalltalk .hljs-class,
@@ -46,7 +48,7 @@ Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac at SoftwareManiac
 .asciidoc .hljs-header,
 .markdown .hljs-header,
 .coffeescript .hljs-attribute {
-  color: #800;
+  color: #756bb1;
 }
 
 .smartquote,
@@ -57,7 +59,7 @@ Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac at SoftwareManiac
 .hljs-chunk,
 .asciidoc .hljs-blockquote,
 .markdown .hljs-blockquote {
-  color: #888;
+  color: #636363;
 }
 
 .hljs-number,
@@ -75,7 +77,7 @@ Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac at SoftwareManiac
 .markdown .hljs-bullet,
 .asciidoc .hljs-link_url,
 .markdown .hljs-link_url {
-  color: #080;
+  color: #31a354;
 }
 
 .hljs-label,
@@ -107,14 +109,15 @@ Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac at SoftwareManiac
 .lasso .hljs-attribute,
 .coffeescript .hljs-property,
 .hljs-phony {
-  color: #88F
+  color: #88f;
 }
 
+
+
 .hljs-keyword,
 .hljs-id,
 .hljs-title,
 .hljs-built_in,
-.hljs-aggregate,
 .css .hljs-tag,
 .hljs-javadoctag,
 .hljs-phpdoc,
@@ -129,7 +132,7 @@ Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac at SoftwareManiac
 .markdown .hljs-strong,
 .hljs-request,
 .hljs-status {
-  font-weight: bold;
+  color: #3182bd;
 }
 
 .asciidoc .hljs-emphasis,
@@ -151,3 +154,14 @@ Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac at SoftwareManiac
 .xml .hljs-cdata {
   opacity: 0.5;
 }
+
+.css .hljs-attribute,
+.html .hljs-attribute {
+  color: #e6550d;
+}
+
+.css .hljs-class,
+.html .hljs-tag,
+.html .hljs-title {
+  color: #3182bd;
+}
diff --git a/src/styles/dark.css b/src/styles/dark.css
index e479d0a..4f9b9fa 100644
--- a/src/styles/dark.css
+++ b/src/styles/dark.css
@@ -5,7 +5,9 @@ Dark style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac at SoftwareManiacs.Or
 */
 
 .hljs {
-  display: block; padding: 0.5em;
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
   background: #444;
 }
 
@@ -23,7 +25,7 @@ Dark style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac at SoftwareManiacs.Or
 
 .hljs,
 .hljs-subst {
-  color: #DDD;
+  color: #ddd;
 }
 
 .hljs-string,
@@ -38,7 +40,6 @@ Dark style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac at SoftwareManiacs.Or
 .ruby .hljs-symbol .hljs-string,
 .ruby .hljs-class .hljs-parent,
 .hljs-built_in,
-.sql .hljs-aggregate,
 .django .hljs-template_tag,
 .django .hljs-variable,
 .smalltalk .hljs-class,
@@ -57,7 +58,7 @@ Dark style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac at SoftwareManiacs.Or
 .tex .hljs-command,
 .hljs-prompt,
 .coffeescript .hljs-attribute {
-  color: #D88;
+  color: #d88;
 }
 
 .hljs-comment,
@@ -80,7 +81,6 @@ Dark style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac at SoftwareManiacs.Or
 .hljs-phpdoc,
 .haskell .hljs-type,
 .vbscript .hljs-built_in,
-.sql .hljs-aggregate,
 .rsl .hljs-built_in,
 .smalltalk .hljs-class,
 .diff .hljs-header,
diff --git a/src/styles/default.css b/src/styles/default.css
index 3d8485b..e5bd280 100644
--- a/src/styles/default.css
+++ b/src/styles/default.css
@@ -5,8 +5,10 @@ Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac at SoftwareManiac
 */
 
 .hljs {
-  display: block; padding: 0.5em;
-  background: #F0F0F0;
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
+  background: #f0f0f0;
 }
 
 .hljs,
@@ -24,13 +26,11 @@ Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac at SoftwareManiac
 .hljs-parent,
 .hljs-tag .hljs-value,
 .hljs-rules .hljs-value,
-.hljs-rules .hljs-value .hljs-number,
 .hljs-preprocessor,
 .hljs-pragma,
 .haml .hljs-symbol,
 .ruby .hljs-symbol,
 .ruby .hljs-symbol .hljs-string,
-.hljs-aggregate,
 .hljs-template_tag,
 .django .hljs-variable,
 .smalltalk .hljs-class,
@@ -107,14 +107,13 @@ Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac at SoftwareManiac
 .lasso .hljs-attribute,
 .coffeescript .hljs-property,
 .hljs-phony {
-  color: #88F
+  color: #88f;
 }
 
 .hljs-keyword,
 .hljs-id,
 .hljs-title,
 .hljs-built_in,
-.hljs-aggregate,
 .css .hljs-tag,
 .hljs-javadoctag,
 .hljs-phpdoc,
diff --git a/src/styles/docco.css b/src/styles/docco.css
index 993fd26..599fae8 100644
--- a/src/styles/docco.css
+++ b/src/styles/docco.css
@@ -3,9 +3,11 @@ Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine
 */
 
 .hljs {
-  display: block; padding: 0.5em;
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
   color: #000;
-  background: #f8f8ff
+  background: #f8f8ff;
 }
 
 .hljs-comment,
@@ -13,7 +15,7 @@ Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine
 .diff .hljs-header,
 .hljs-javadoc {
   color: #408080;
-  font-style: italic
+  font-style: italic;
 }
 
 .hljs-keyword,
@@ -29,7 +31,7 @@ Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine
 
 .hljs-number,
 .hljs-hexcolor {
-  color: #40a070
+  color: #40a070;
 }
 
 .hljs-string,
@@ -41,23 +43,23 @@ Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine
 
 .hljs-title,
 .hljs-id {
-  color: #19469D;
+  color: #19469d;
 }
 .hljs-params {
-  color: #00F;
+  color: #00f;
 }
 
 .javascript .hljs-title,
 .lisp .hljs-title,
 .hljs-subst {
-  font-weight: normal
+  font-weight: normal;
 }
 
 .hljs-class .hljs-title,
 .haskell .hljs-label,
 .tex .hljs-command {
   color: #458;
-  font-weight: bold
+  font-weight: bold;
 }
 
 .hljs-tag,
@@ -65,23 +67,23 @@ Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine
 .hljs-rules .hljs-property,
 .django .hljs-tag .hljs-keyword {
   color: #000080;
-  font-weight: normal
+  font-weight: normal;
 }
 
 .hljs-attribute,
 .hljs-variable,
 .instancevar,
 .lisp .hljs-body {
-  color: #008080
+  color: #008080;
 }
 
 .hljs-regexp {
-  color: #B68
+  color: #b68;
 }
 
 .hljs-class {
   color: #458;
-  font-weight: bold
+  font-weight: bold;
 }
 
 .hljs-symbol,
@@ -91,14 +93,14 @@ Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine
 .lisp .hljs-keyword,
 .tex .hljs-special,
 .input_number {
-  color: #990073
+  color: #990073;
 }
 
 .builtin,
 .constructor,
 .hljs-built_in,
 .lisp .hljs-title {
-  color: #0086b3
+  color: #0086b3;
 }
 
 .hljs-preprocessor,
@@ -108,23 +110,23 @@ Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine
 .hljs-shebang,
 .hljs-cdata {
   color: #999;
-  font-weight: bold
+  font-weight: bold;
 }
 
 .hljs-deletion {
-  background: #fdd
+  background: #fdd;
 }
 
 .hljs-addition {
-  background: #dfd
+  background: #dfd;
 }
 
 .diff .hljs-change {
-  background: #0086b3
+  background: #0086b3;
 }
 
 .hljs-chunk {
-  color: #aaa
+  color: #aaa;
 }
 
 .tex .hljs-formula {
diff --git a/src/styles/far.css b/src/styles/far.css
index ecac3c9..444d956 100644
--- a/src/styles/far.css
+++ b/src/styles/far.css
@@ -5,27 +5,28 @@ FAR Style (c) MajestiC <majestic2k at gmail.com>
 */
 
 .hljs {
-  display: block; padding: 0.5em;
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
   background: #000080;
 }
 
 .hljs,
 .hljs-subst {
-  color: #0FF;
+  color: #0ff;
 }
 
 .hljs-string,
 .ruby .hljs-string,
 .haskell .hljs-type,
 .hljs-tag .hljs-value,
-.css .hljs-rules .hljs-value,
-.css .hljs-rules .hljs-value .hljs-number,
+.hljs-rules .hljs-value,
+.hljs-rules .hljs-value .hljs-number,
 .hljs-preprocessor,
 .hljs-pragma,
 .ruby .hljs-symbol,
 .ruby .hljs-symbol .hljs-string,
 .hljs-built_in,
-.sql .hljs-aggregate,
 .django .hljs-template_tag,
 .django .hljs-variable,
 .smalltalk .hljs-class,
@@ -35,7 +36,7 @@ FAR Style (c) MajestiC <majestic2k at gmail.com>
 .tex .hljs-command,
 .clojure .hljs-title,
 .coffeescript .hljs-attribute {
-  color: #FF0;
+  color: #ff0;
 }
 
 .hljs-keyword,
@@ -43,7 +44,6 @@ FAR Style (c) MajestiC <majestic2k at gmail.com>
 .hljs-title,
 .haskell .hljs-type,
 .vbscript .hljs-built_in,
-.sql .hljs-aggregate,
 .rsl .hljs-built_in,
 .smalltalk .hljs-class,
 .xml .hljs-tag .hljs-title,
@@ -54,7 +54,7 @@ FAR Style (c) MajestiC <majestic2k at gmail.com>
 .bash .hljs-variable,
 .tex .hljs-special,
 .clojure .hljs-built_in {
-  color: #FFF;
+  color: #fff;
 }
 
 .hljs-comment,
@@ -75,7 +75,7 @@ FAR Style (c) MajestiC <majestic2k at gmail.com>
 .smalltalk .hljs-symbol,
 .smalltalk .hljs-char,
 .clojure .hljs-attribute {
-  color: #0F0;
+  color: #0f0;
 }
 
 .python .hljs-decorator,
@@ -98,7 +98,6 @@ FAR Style (c) MajestiC <majestic2k at gmail.com>
 .hljs-title,
 .haskell .hljs-type,
 .vbscript .hljs-built_in,
-.sql .hljs-aggregate,
 .rsl .hljs-built_in,
 .smalltalk .hljs-class,
 .hljs-winutils,
diff --git a/src/styles/foundation.css b/src/styles/foundation.css
index bc8d4df..3c4ea99 100644
--- a/src/styles/foundation.css
+++ b/src/styles/foundation.css
@@ -7,7 +7,9 @@ Date: 2013-04-02
 */
 
 .hljs {
-  display: block; padding: 0.5em;
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
   background: #eee;
 }
 
diff --git a/src/styles/github.css b/src/styles/github.css
index 71967a3..47fc265 100644
--- a/src/styles/github.css
+++ b/src/styles/github.css
@@ -5,9 +5,11 @@ github.com style (c) Vasily Polovnyov <vast at whiteants.net>
 */
 
 .hljs {
-  display: block; padding: 0.5em;
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
   color: #333;
-  background: #f8f8f8
+  background: #f8f8f8;
 }
 
 .hljs-comment,
@@ -15,7 +17,7 @@ github.com style (c) Vasily Polovnyov <vast at whiteants.net>
 .diff .hljs-header,
 .hljs-javadoc {
   color: #998;
-  font-style: italic
+  font-style: italic;
 }
 
 .hljs-keyword,
@@ -27,7 +29,7 @@ github.com style (c) Vasily Polovnyov <vast at whiteants.net>
 .hljs-request,
 .hljs-status {
   color: #333;
-  font-weight: bold
+  font-weight: bold;
 }
 
 .hljs-number,
@@ -40,7 +42,7 @@ github.com style (c) Vasily Polovnyov <vast at whiteants.net>
 .hljs-tag .hljs-value,
 .hljs-phpdoc,
 .tex .hljs-formula {
-  color: #d14
+  color: #d14;
 }
 
 .hljs-title,
@@ -48,14 +50,14 @@ github.com style (c) Vasily Polovnyov <vast at whiteants.net>
 .coffeescript .hljs-params,
 .scss .hljs-preprocessor {
   color: #900;
-  font-weight: bold
+  font-weight: bold;
 }
 
 .javascript .hljs-title,
 .lisp .hljs-title,
 .clojure .hljs-title,
 .hljs-subst {
-  font-weight: normal
+  font-weight: normal;
 }
 
 .hljs-class .hljs-title,
@@ -63,7 +65,7 @@ github.com style (c) Vasily Polovnyov <vast at whiteants.net>
 .vhdl .hljs-literal,
 .tex .hljs-command {
   color: #458;
-  font-weight: bold
+  font-weight: bold;
 }
 
 .hljs-tag,
@@ -71,17 +73,17 @@ github.com style (c) Vasily Polovnyov <vast at whiteants.net>
 .hljs-rules .hljs-property,
 .django .hljs-tag .hljs-keyword {
   color: #000080;
-  font-weight: normal
+  font-weight: normal;
 }
 
 .hljs-attribute,
 .hljs-variable,
 .lisp .hljs-body {
-  color: #008080
+  color: #008080;
 }
 
 .hljs-regexp {
-  color: #009926
+  color: #009926;
 }
 
 .hljs-symbol,
@@ -89,13 +91,13 @@ github.com style (c) Vasily Polovnyov <vast at whiteants.net>
 .lisp .hljs-keyword,
 .tex .hljs-special,
 .hljs-prompt {
-  color: #990073
+  color: #990073;
 }
 
 .hljs-built_in,
 .lisp .hljs-title,
 .clojure .hljs-built_in {
-  color: #0086b3
+  color: #0086b3;
 }
 
 .hljs-preprocessor,
@@ -105,21 +107,21 @@ github.com style (c) Vasily Polovnyov <vast at whiteants.net>
 .hljs-shebang,
 .hljs-cdata {
   color: #999;
-  font-weight: bold
+  font-weight: bold;
 }
 
 .hljs-deletion {
-  background: #fdd
+  background: #fdd;
 }
 
 .hljs-addition {
-  background: #dfd
+  background: #dfd;
 }
 
 .diff .hljs-change {
-  background: #0086b3
+  background: #0086b3;
 }
 
 .hljs-chunk {
-  color: #aaa
+  color: #aaa;
 }
diff --git a/src/styles/googlecode.css b/src/styles/googlecode.css
index 45b8b3b..fd23736 100644
--- a/src/styles/googlecode.css
+++ b/src/styles/googlecode.css
@@ -5,14 +5,16 @@ Google Code style (c) Aahan Krish <geekpanth3r at gmail.com>
 */
 
 .hljs {
-  display: block; padding: 0.5em;
-  background: white; color: black;
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
+  background: white;
+  color: black;
 }
 
 .hljs-comment,
 .hljs-template_comment,
-.hljs-javadoc,
-.hljs-comment * {
+.hljs-javadoc {
   color: #800;
 }
 
@@ -58,7 +60,6 @@ Google Code style (c) Aahan Krish <geekpanth3r at gmail.com>
 .hljs-prompt,
 .hljs-hexcolor,
 .hljs-rules .hljs-value,
-.css .hljs-value .hljs-number,
 .hljs-literal,
 .hljs-symbol,
 .ruby .hljs-symbol .hljs-string,
@@ -95,7 +96,7 @@ Google Code style (c) Aahan Krish <geekpanth3r at gmail.com>
 
 .css .hljs-class,
 .css .hljs-id {
-  color: #9B703F;
+  color: #9b703f;
 }
 
 .hljs-value .hljs-important {
@@ -104,13 +105,13 @@ Google Code style (c) Aahan Krish <geekpanth3r at gmail.com>
 }
 
 .hljs-rules .hljs-keyword {
-  color: #C5AF75;
+  color: #c5af75;
 }
 
 .hljs-annotation,
 .apache .hljs-sqbracket,
 .nginx .hljs-built_in {
-  color: #9B859D;
+  color: #9b859d;
 }
 
 .hljs-preprocessor,
@@ -120,7 +121,7 @@ Google Code style (c) Aahan Krish <geekpanth3r at gmail.com>
 }
 
 .tex .hljs-formula {
-  background-color: #EEE;
+  background-color: #eee;
   font-style: italic;
 }
 
@@ -131,15 +132,15 @@ Google Code style (c) Aahan Krish <geekpanth3r at gmail.com>
 }
 
 .diff .hljs-change {
-  background-color: #BCCFF9;
+  background-color: #bccff9;
 }
 
 .hljs-addition {
-  background-color: #BAEEBA;
+  background-color: #baeeba;
 }
 
 .hljs-deletion {
-  background-color: #FFC8BD;
+  background-color: #ffc8bd;
 }
 
 .hljs-comment .hljs-yardoctag {
diff --git a/src/styles/hybrid.css b/src/styles/hybrid.css
new file mode 100644
index 0000000..f6c1427
--- /dev/null
+++ b/src/styles/hybrid.css
@@ -0,0 +1,169 @@
+/*
+
+vim-hybrid theme by w0ng (https://github.com/w0ng/vim-hybrid)
+
+*/
+
+/*background color*/
+.hljs {
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
+  background: #1d1f21;
+}
+
+/*selection color*/
+.hljs::selection,
+.hljs span::selection {
+	background: #373b41;
+}
+.hljs::-moz-selection,
+.hljs span::-moz-selection {
+	background: #373b41;
+}
+
+/*foreground color*/
+.hljs,
+.hljs-setting .hljs-value,
+.hljs-expression .hljs-variable,
+.hljs-expression .hljs-begin-block,
+.hljs-expression .hljs-end-block,
+.hljs-class .hljs-params,
+.hljs-function .hljs-params,
+.hljs-at_rule .hljs-preprocessor {
+  color: #c5c8c6;
+}
+
+/*color: fg_yellow*/
+.hljs-title,
+.hljs-function .hljs-title,
+.hljs-keyword .hljs-common,
+.hljs-class .hljs-title,
+.hljs-decorator,
+.hljs-tag .hljs-title,
+.hljs-header,
+.hljs-sub,
+.hljs-function {
+  color: #f0c674;
+}
+
+/*color: fg_comment*/
+.hljs-comment,
+.hljs-javadoc,
+.hljs-output .hljs-value,
+.hljs-pi,
+.hljs-shebang,
+.hljs-template_comment,
+.hljs-doctype {
+  color: #707880;
+}
+
+/*color: fg_red*/
+.hljs-number,
+.hljs-symbol,
+.hljs-literal,
+.hljs-deletion,
+.hljs-link_url,
+.hljs-symbol .hljs-string,
+.hljs-argument,
+.hljs-hexcolor,
+.hljs-input .hljs-prompt,
+.hljs-char {
+ color: #cc6666
+}
+
+/*color: fg_green*/
+.hljs-string,
+.hljs-special,
+.hljs-javadoctag,
+.hljs-addition,
+.hljs-important,
+.hljs-tag .hljs-value,
+.hljs-at.rule .hljs-keyword,
+.hljs-regexp,
+.hljs-attr_selector {
+  color: #b5bd68;
+}
+
+/*color: fg_purple*/
+.hljs-variable,
+.hljs-property,
+.hljs-envar,
+.hljs-code,
+.hljs-expression,
+.hljs-localvars,
+.hljs-id,
+.hljs-variable .hljs-filter,
+.hljs-variable .hljs-filter .hljs-keyword,
+.hljs-template_tag .hljs-filter .hljs-keyword {
+ color: #b294bb;
+}
+
+/*color: fg_blue*/
+.hljs-statement,
+.hljs-label,
+.hljs-keyword,
+.hljs-xmlDocTag,
+.hljs-function .hljs-keyword,
+.hljs-chunk,
+.hljs-cdata,
+.hljs-link_label,
+.hljs-bullet,
+.hljs-class .hljs-keyword,
+.hljs-smartquote,
+.hljs-method,
+.hljs-list .hljs-title,
+.hljs-tag {
+ color: #81a2be;
+}
+
+/*color: fg_aqua*/
+.hljs-pseudo,
+.hljs-exception,
+.hljs-annotation,
+.hljs-subst,
+.hljs-change,
+.hljs-cbracket,
+.hljs-operator,
+.hljs-horizontal_rule,
+.hljs-preprocessor .hljs-keyword,
+.hljs-typedef,
+.hljs-template_tag,
+.hljs-variable,
+.hljs-variable .hljs-filter .hljs-argument,
+.hljs-at_rule,
+.hljs-at_rule .hljs-string,
+.hljs-at_rule .hljs-keyword {
+  color: #8abeb7;
+}
+
+
+/*color: fg_orange*/
+.hljs-typename ,
+.hljs-inheritance .hljs-parent,
+.hljs-constant,
+.hljs-built_in,
+.hljs-setting,
+.hljs-structure,
+.hljs-link_reference,
+.hljs-attribute,
+.hljs-blockquote,
+.hljs-quoted,
+.hljs-class,
+.hljs-header {
+  color: #de935f;
+}
+
+.hljs-emphasis
+{
+  font-style: italic;
+}
+
+.hljs-strong
+{
+  font-weight: bold;
+}
+
+
+
+
diff --git a/src/styles/idea.css b/src/styles/idea.css
index 77352f4..576bc62 100644
--- a/src/styles/idea.css
+++ b/src/styles/idea.css
@@ -5,13 +5,16 @@ Intellij Idea-like styling (c) Vasily Polovnyov <vast at whiteants.net>
 */
 
 .hljs {
-  display: block; padding: 0.5em;
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
   color: #000;
   background: #fff;
 }
 
 .hljs-subst,
-.hljs-title {
+.hljs-title,
+.json .hljs-value {
   font-weight: normal;
   color: #000;
 }
diff --git a/src/styles/ir_black.css b/src/styles/ir_black.css
index cc64ef5..d92dc66 100644
--- a/src/styles/ir_black.css
+++ b/src/styles/ir_black.css
@@ -3,8 +3,11 @@
 */
 
 .hljs {
-  display: block; padding: 0.5em;
-  background: #000; color: #f8f8f8;
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
+  background: #000;
+  color: #f8f8f8;
 }
 
 .hljs-shebang,
@@ -20,14 +23,14 @@
 .hljs-request,
 .hljs-status,
 .clojure .hljs-attribute {
-  color: #96CBFE;
+  color: #96cbfe;
 }
 
 .hljs-sub .hljs-keyword,
 .method,
 .hljs-list .hljs-title,
 .nginx .hljs-title {
-  color: #FFFFB6;
+  color: #ffffb6;
 }
 
 .hljs-string,
@@ -38,15 +41,15 @@
 .apache .hljs-cbracket,
 .hljs-date,
 .coffeescript .hljs-attribute {
-  color: #A8FF60;
+  color: #a8ff60;
 }
 
 .hljs-subst {
-  color: #DAEFA3;
+  color: #daefa3;
 }
 
 .hljs-regexp {
-  color: #E9C062;
+  color: #e9c062;
 }
 
 .hljs-title,
@@ -61,7 +64,7 @@
 .hljs-yardoctag,
 .hljs-phpdoc,
 .nginx .hljs-built_in {
-  color: #FFFFB6;
+  color: #ffffb6;
 }
 
 .hljs-symbol,
@@ -70,28 +73,28 @@
 .hljs-variable,
 .vbscript,
 .hljs-literal {
-  color: #C6C5FE;
+  color: #c6c5fe;
 }
 
 .css .hljs-tag {
-  color: #96CBFE;
+  color: #96cbfe;
 }
 
 .css .hljs-rules .hljs-property,
 .css .hljs-id {
-  color: #FFFFB6;
+  color: #ffffb6;
 }
 
 .css .hljs-class {
-  color: #FFF;
+  color: #fff;
 }
 
 .hljs-hexcolor {
-  color: #C6C5FE;
+  color: #c6c5fe;
 }
 
 .hljs-number {
-  color:#FF73FD;
+  color:#ff73fd;
 }
 
 .coffeescript .javascript,
diff --git a/src/styles/paraiso.light.css b/src/styles/kimbie.dark.css
similarity index 64%
copy from src/styles/paraiso.light.css
copy to src/styles/kimbie.dark.css
index 494fcb4..e5166c7 100644
--- a/src/styles/paraiso.light.css
+++ b/src/styles/kimbie.dark.css
@@ -1,16 +1,17 @@
 /*
-    Paraíso (light)
-    Created by Jan T. Sott (http://github.com/idleberg)
-    Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
+    Name:     Kimbie (dark)
+    Author:   Jan T. Sott
+    License:  Creative Commons Attribution-ShareAlike 4.0 Unported License
+    URL:      https://github.com/idleberg/Kimbie-highlight.js
 */
 
-/* Paraíso Comment */
+/* Kimbie Comment */
 .hljs-comment,
 .hljs-title {
-  color: #776e71;
+  color: #d6baad;
 }
 
-/* Paraíso Red */
+/* Kimbie Red */
 .hljs-variable,
 .hljs-attribute,
 .hljs-tag,
@@ -23,41 +24,41 @@
 .css .hljs-id,
 .css .hljs-class,
 .css .hljs-pseudo {
-  color: #ef6155;
+  color: #dc3958;
 }
 
-/* Paraíso Orange */
+/* Kimbie Orange */
 .hljs-number,
 .hljs-preprocessor,
 .hljs-built_in,
 .hljs-literal,
 .hljs-params,
 .hljs-constant {
-  color: #f99b15;
+  color: #f79a32;
 }
 
-/* Paraíso Yellow */
+/* Kimbie Yellow */
 .ruby .hljs-class .hljs-title,
 .css .hljs-rules .hljs-attribute {
-  color: #fec418;
+  color: #f06431;
 }
 
-/* Paraíso Green */
+/* Kimbie Green */
 .hljs-string,
 .hljs-value,
 .hljs-inheritance,
 .hljs-header,
 .ruby .hljs-symbol,
 .xml .hljs-cdata {
-  color: #48b685;
+  color: #889b4a;
 }
 
-/* Paraíso Aqua */
+/* Kimbie Aqua */
 .css .hljs-hexcolor {
-  color: #5bc4bf;
+  color:: #088649;
 }
 
-/* Paraíso Blue */
+/* Kimbie Blue */
 .hljs-function,
 .python .hljs-decorator,
 .python .hljs-title,
@@ -66,19 +67,20 @@
 .perl .hljs-sub,
 .javascript .hljs-title,
 .coffeescript .hljs-title {
-  color: #06b6ef;
+  color: #8ab1b0;
 }
 
-/* Paraíso Purple */
+/* Kimbie Purple */
 .hljs-keyword,
 .javascript .hljs-function {
-  color: #815ba4;
+  color: #98676a;
 }
 
 .hljs {
   display: block;
-  background: #e7e9db;
-  color: #4f424c;
+  overflow-x: auto;
+  background: #221a0f;
+  color: #d3af86;
   padding: 0.5em;
 }
 
diff --git a/src/styles/paraiso.light.css b/src/styles/kimbie.light.css
similarity index 64%
copy from src/styles/paraiso.light.css
copy to src/styles/kimbie.light.css
index 494fcb4..8ccbe49 100644
--- a/src/styles/paraiso.light.css
+++ b/src/styles/kimbie.light.css
@@ -1,16 +1,17 @@
 /*
-    Paraíso (light)
-    Created by Jan T. Sott (http://github.com/idleberg)
-    Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
+    Name:     Kimbie (light)
+    Author:   Jan T. Sott
+    License:  Creative Commons Attribution-ShareAlike 4.0 Unported License
+    URL:      https://github.com/idleberg/Kimbie-highlight.js
 */
 
-/* Paraíso Comment */
+/* Kimbie Comment */
 .hljs-comment,
 .hljs-title {
-  color: #776e71;
+  color: #a57a4c;
 }
 
-/* Paraíso Red */
+/* Kimbie Red */
 .hljs-variable,
 .hljs-attribute,
 .hljs-tag,
@@ -23,41 +24,41 @@
 .css .hljs-id,
 .css .hljs-class,
 .css .hljs-pseudo {
-  color: #ef6155;
+  color: #dc3958;
 }
 
-/* Paraíso Orange */
+/* Kimbie Orange */
 .hljs-number,
 .hljs-preprocessor,
 .hljs-built_in,
 .hljs-literal,
 .hljs-params,
 .hljs-constant {
-  color: #f99b15;
+  color: #f79a32;
 }
 
-/* Paraíso Yellow */
+/* Kimbie Yellow */
 .ruby .hljs-class .hljs-title,
 .css .hljs-rules .hljs-attribute {
-  color: #fec418;
+  color: #f06431;
 }
 
-/* Paraíso Green */
+/* Kimbie Green */
 .hljs-string,
 .hljs-value,
 .hljs-inheritance,
 .hljs-header,
 .ruby .hljs-symbol,
 .xml .hljs-cdata {
-  color: #48b685;
+  color: #889b4a;
 }
 
-/* Paraíso Aqua */
+/* Kimbie Aqua */
 .css .hljs-hexcolor {
-  color: #5bc4bf;
+  color: #088649;
 }
 
-/* Paraíso Blue */
+/* Kimbie Blue */
 .hljs-function,
 .python .hljs-decorator,
 .python .hljs-title,
@@ -66,19 +67,20 @@
 .perl .hljs-sub,
 .javascript .hljs-title,
 .coffeescript .hljs-title {
-  color: #06b6ef;
+  color: #8ab1b0;
 }
 
-/* Paraíso Purple */
+/* Kimbie Purple */
 .hljs-keyword,
 .javascript .hljs-function {
-  color: #815ba4;
+  color: #98676a;
 }
 
 .hljs {
   display: block;
-  background: #e7e9db;
-  color: #4f424c;
+  overflow-x: auto;
+  background: #fbebd4;
+  color: #84613d;
   padding: 0.5em;
 }
 
diff --git a/src/styles/magula.css b/src/styles/magula.css
index cafe3d3..a977678 100644
--- a/src/styles/magula.css
+++ b/src/styles/magula.css
@@ -8,7 +8,9 @@ Music: Aphex Twin / Xtal
 */
 
 .hljs {
-  display: block; padding: 0.5em;
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
   background-color: #f4f4f4;
 }
 
@@ -24,12 +26,10 @@ Music: Aphex Twin / Xtal
 .hljs-parent,
 .hljs-tag .hljs-value,
 .hljs-rules .hljs-value,
-.hljs-rules .hljs-value .hljs-number,
 .hljs-preprocessor,
 .hljs-pragma,
 .ruby .hljs-symbol,
 .ruby .hljs-symbol .hljs-string,
-.hljs-aggregate,
 .hljs-template_tag,
 .django .hljs-variable,
 .smalltalk .hljs-class,
@@ -88,7 +88,6 @@ Music: Aphex Twin / Xtal
 .hljs-phpdoc,
 .hljs-title,
 .hljs-built_in,
-.hljs-aggregate,
 .smalltalk .hljs-class,
 .hljs-winutils,
 .bash .hljs-variable,
diff --git a/src/styles/mono-blue.css b/src/styles/mono-blue.css
index 4152d82..ec837db 100644
--- a/src/styles/mono-blue.css
+++ b/src/styles/mono-blue.css
@@ -2,8 +2,11 @@
   Five-color theme from a single blue hue.
 */
 .hljs {
-  display: block; padding: 0.5em;
-  background: #EAEEF3; color: #00193A;
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
+  background: #eaeef3;
+  color: #00193a;
 }
 
 .hljs-keyword,
@@ -34,7 +37,7 @@
 .hljs-link_label,
 .hljs-blockquote,
 .hljs-header {
-  color: #0048AB;
+  color: #0048ab;
 }
 
 .hljs-decorator,
@@ -58,5 +61,5 @@
 .hljs-bullet,
 .hljs-sqbracket,
 .hljs-phony {
-  color: #4C81C9;
+  color: #4c81c9;
 }
diff --git a/src/styles/monokai.css b/src/styles/monokai.css
index 4e49bef..bf1a13b 100644
--- a/src/styles/monokai.css
+++ b/src/styles/monokai.css
@@ -3,7 +3,9 @@ Monokai style - ported by Luigi Maselli - http://grigio.org
 */
 
 .hljs {
-  display: block; padding: 0.5em;
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
   background: #272822;
 }
 
@@ -19,16 +21,16 @@ Monokai style - ported by Luigi Maselli - http://grigio.org
 .clojure .hljs-built_in,
 .nginx .hljs-title,
 .tex .hljs-special {
-  color: #F92672;
+  color: #f92672;
 }
 
 .hljs {
-  color: #DDD;
+  color: #ddd;
 }
 
 .hljs .hljs-constant,
 .asciidoc .hljs-code {
-	color: #66D9EF;
+	color: #66d9ef;
 }
 
 .hljs-code,
@@ -43,7 +45,7 @@ Monokai style - ported by Luigi Maselli - http://grigio.org
 .hljs-symbol .hljs-string,
 .hljs-value,
 .hljs-regexp {
-	color: #BF79DB;
+	color: #bf79db;
 }
 
 .hljs-link_url,
@@ -58,7 +60,6 @@ Monokai style - ported by Luigi Maselli - http://grigio.org
 .hljs-pragma,
 .ruby .hljs-class .hljs-parent,
 .hljs-built_in,
-.sql .hljs-aggregate,
 .django .hljs-template_tag,
 .django .hljs-variable,
 .smalltalk .hljs-class,
@@ -75,7 +76,7 @@ Monokai style - ported by Luigi Maselli - http://grigio.org
 .apache .hljs-cbracket,
 .tex .hljs-command,
 .hljs-prompt {
-  color: #A6E22E;
+  color: #a6e22e;
 }
 
 .hljs-comment,
@@ -91,7 +92,7 @@ Monokai style - ported by Luigi Maselli - http://grigio.org
 .hljs-shebang,
 .apache .hljs-sqbracket,
 .tex .hljs-formula {
-  color: #75715E;
+  color: #75715e;
 }
 
 .hljs-keyword,
@@ -102,7 +103,6 @@ Monokai style - ported by Luigi Maselli - http://grigio.org
 .hljs-header,
 .haskell .hljs-type,
 .vbscript .hljs-built_in,
-.sql .hljs-aggregate,
 .rsl .hljs-built_in,
 .smalltalk .hljs-class,
 .diff .hljs-header,
diff --git a/src/styles/monokai_sublime.css b/src/styles/monokai_sublime.css
index 7b0eb2e..afb70df 100644
--- a/src/styles/monokai_sublime.css
+++ b/src/styles/monokai_sublime.css
@@ -6,6 +6,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
 
 .hljs {
   display: block;
+  overflow-x: auto;
   padding: 0.5em;
   background: #23241f;
 }
@@ -79,7 +80,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
 .css .hljs-tag,
 .css .unit,
 .css .hljs-important {
-  color: #F92672;
+  color: #f92672;
 }
 
 .hljs-function .hljs-keyword,
@@ -101,7 +102,6 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
 .haskell .hljs-type,
 .ruby .hljs-class .hljs-parent,
 .hljs-built_in,
-.sql .hljs-aggregate,
 .django .hljs-template_tag,
 .django .hljs-variable,
 .smalltalk .hljs-class,
diff --git a/src/styles/obsidian.css b/src/styles/obsidian.css
index 1174e4c..1116c8a 100644
--- a/src/styles/obsidian.css
+++ b/src/styles/obsidian.css
@@ -4,8 +4,10 @@
  */
 
 .hljs {
-    display: block; padding: 0.5em;
-    background: #282B2E;
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
+  background: #282b2e;
 }
 
 .hljs-keyword,
@@ -18,57 +20,57 @@
 .nginx .hljs-title,
 .css .hljs-id,
 .tex .hljs-special {
-    color: #93C763;
+  color: #93c763;
 }
 
 .hljs-number {
-    color: #FFCD22;
+  color: #ffcd22;
 }
 
 .hljs {
-    color: #E0E2E4;
+  color: #e0e2e4;
 }
 
 .css .hljs-tag,
 .css .hljs-pseudo {
-    color: #D0D2B5;
+  color: #d0d2b5;
 }
 
 .hljs-attribute,
 .hljs .hljs-constant {
-    color: #668BB0;
+  color: #668bb0;
 }
 
 .xml .hljs-attribute {
-    color: #B3B689;
+  color: #b3b689;
 }
 
 .xml .hljs-tag .hljs-value {
-    color: #E8E2B7;
+  color: #e8e2b7;
 }
 
 .hljs-code,
 .hljs-class .hljs-title,
 .hljs-header {
-    color: white;
+  color: white;
 }
 
 .hljs-class,
 .hljs-hexcolor {
-    color: #93C763;
+  color: #93c763;
 }
 
 .hljs-regexp {
-    color: #D39745;
+  color: #d39745;
 }
 
 .hljs-at_rule,
 .hljs-at_rule .hljs-keyword {
-    color: #A082BD;
+  color: #a082bd;
 }
 
 .hljs-doctype {
-    color: #557182;
+  color: #557182;
 }
 
 .hljs-link_url,
@@ -82,7 +84,6 @@
 .hljs-pragma,
 .ruby .hljs-class .hljs-parent,
 .hljs-built_in,
-.sql .hljs-aggregate,
 .django .hljs-template_tag,
 .django .hljs-variable,
 .smalltalk .hljs-class,
@@ -99,11 +100,11 @@
 .apache .hljs-cbracket,
 .tex .hljs-command,
 .hljs-prompt {
-    color: #8CBBAD;
+  color: #8cbbad;
 }
 
 .hljs-string {
-    color: #EC7600;
+  color: #ec7600;
 }
 
 .hljs-comment,
@@ -117,7 +118,7 @@
 .hljs-shebang,
 .apache .hljs-sqbracket,
 .tex .hljs-formula {
-    color: #818E96;
+  color: #818e96;
 }
 
 .hljs-keyword,
@@ -128,7 +129,6 @@
 .hljs-header,
 .haskell .hljs-type,
 .vbscript .hljs-built_in,
-.sql .hljs-aggregate,
 .rsl .hljs-built_in,
 .smalltalk .hljs-class,
 .diff .hljs-header,
@@ -140,7 +140,7 @@
 .hljs-request,
 .hljs-at_rule .hljs-keyword,
 .hljs-status {
-    font-weight: bold;
+  font-weight: bold;
 }
 
 .coffeescript .javascript,
@@ -150,5 +150,5 @@
 .xml .vbscript,
 .xml .css,
 .xml .hljs-cdata {
-    opacity: 0.5;
+  opacity: 0.5;
 }
diff --git a/src/styles/paraiso.dark.css b/src/styles/paraiso.dark.css
index bbbccdd..0c895f6 100644
--- a/src/styles/paraiso.dark.css
+++ b/src/styles/paraiso.dark.css
@@ -77,6 +77,7 @@
 
 .hljs {
   display: block;
+  overflow-x: auto;
   background: #2f1e2e;
   color: #a39e9b;
   padding: 0.5em;
diff --git a/src/styles/paraiso.light.css b/src/styles/paraiso.light.css
index 494fcb4..8c2d64e 100644
--- a/src/styles/paraiso.light.css
+++ b/src/styles/paraiso.light.css
@@ -77,6 +77,7 @@
 
 .hljs {
   display: block;
+  overflow-x: auto;
   background: #e7e9db;
   color: #4f424c;
   padding: 0.5em;
diff --git a/src/styles/pojoaque.css b/src/styles/pojoaque.css
index 6ee925d..edfba2c 100644
--- a/src/styles/pojoaque.css
+++ b/src/styles/pojoaque.css
@@ -7,8 +7,10 @@ Based on Solarized Style from http://ethanschoonover.com/solarized
 */
 
 .hljs {
-  display: block; padding: 0.5em;
-  color: #DCCF8F;
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
+  color: #dccf8f;
   background: url(./pojoaque.jpg) repeat scroll left top #181914;
 }
 
@@ -31,7 +33,7 @@ Based on Solarized Style from http://ethanschoonover.com/solarized
 .css .hljs-tag,
 .clojure .hljs-title,
 .nginx .hljs-title {
-  color: #B64926;
+  color: #b64926;
 }
 
 .hljs-number,
@@ -55,7 +57,7 @@ Based on Solarized Style from http://ethanschoonover.com/solarized
 .clojure .hljs-built_in,
 .hljs-identifier,
 .hljs-id {
-  color: #FFB03B;
+  color: #ffb03b;
 }
 
 .hljs-attribute,
@@ -75,7 +77,7 @@ Based on Solarized Style from http://ethanschoonover.com/solarized
 
 .css .hljs-number,
 .css .hljs-hexcolor {
-  color: #DCCF8F;
+  color: #dccf8f;
 }
 
 .css .hljs-class {
diff --git a/src/styles/railscasts.css b/src/styles/railscasts.css
index 6a38064..12e4f4d 100644
--- a/src/styles/railscasts.css
+++ b/src/styles/railscasts.css
@@ -6,16 +6,17 @@ Railscasts-like style (c) Visoft, Inc. (Damien White)
 
 .hljs {
   display: block;
+  overflow-x: auto;
   padding: 0.5em;
   background: #232323;
-  color: #E6E1DC;
+  color: #e6e1dc;
 }
 
 .hljs-comment,
 .hljs-template_comment,
 .hljs-javadoc,
 .hljs-shebang {
-  color: #BC9458;
+  color: #bc9458;
   font-style: italic;
 }
 
@@ -26,7 +27,7 @@ Railscasts-like style (c) Visoft, Inc. (Damien White)
 .nginx .hljs-title,
 .method,
 .hljs-list .hljs-title {
-  color: #C26230;
+  color: #c26230;
 }
 
 .hljs-string,
@@ -40,11 +41,11 @@ Railscasts-like style (c) Visoft, Inc. (Damien White)
 .hljs-date,
 .tex .hljs-command,
 .markdown .hljs-link_label {
-  color: #A5C261;
+  color: #a5c261;
 }
 
 .hljs-subst {
-  color: #519F50;
+  color: #519f50;
 }
 
 .hljs-tag,
@@ -54,11 +55,11 @@ Railscasts-like style (c) Visoft, Inc. (Damien White)
 .hljs-sub .hljs-identifier,
 .hljs-pi,
 .input_number {
-  color: #E8BF6A;
+  color: #e8bf6a;
 }
 
 .hljs-identifier {
-  color: #D0D0FF;
+  color: #d0d0ff;
 }
 
 .hljs-class .hljs-title,
@@ -71,7 +72,7 @@ Railscasts-like style (c) Visoft, Inc. (Damien White)
 }
 
 .hljs-constant {
-  color: #DA4939;
+  color: #da4939;
 }
 
 
@@ -81,7 +82,7 @@ Railscasts-like style (c) Visoft, Inc. (Damien White)
 .ruby .hljs-symbol .hljs-identifier,
 .markdown .hljs-link_url,
 .hljs-attribute {
-  color: #6D9CBE;
+  color: #6d9cbe;
 }
 
 .markdown .hljs-link_url {
@@ -93,80 +94,80 @@ Railscasts-like style (c) Visoft, Inc. (Damien White)
 .hljs-params,
 .hljs-variable,
 .clojure .hljs-attribute {
-  color: #D0D0FF;
+  color: #d0d0ff;
 }
 
 .css .hljs-tag,
 .hljs-rules .hljs-property,
 .hljs-pseudo,
 .tex .hljs-special {
-  color: #CDA869;
+  color: #cda869;
 }
 
 .css .hljs-class {
-  color: #9B703F;
+  color: #9b703f;
 }
 
 .hljs-rules .hljs-keyword {
-  color: #C5AF75;
+  color: #c5af75;
 }
 
 .hljs-rules .hljs-value {
-  color: #CF6A4C;
+  color: #cf6a4c;
 }
 
 .css .hljs-id {
-  color: #8B98AB;
+  color: #8b98ab;
 }
 
 .hljs-annotation,
 .apache .hljs-sqbracket,
 .nginx .hljs-built_in {
-  color: #9B859D;
+  color: #9b859d;
 }
 
 .hljs-preprocessor,
 .hljs-preprocessor *,
 .hljs-pragma {
-  color: #8996A8 !important;
+  color: #8996a8 !important;
 }
 
 .hljs-hexcolor,
 .css .hljs-value .hljs-number {
-  color: #A5C261;
+  color: #a5c261;
 }
 
 .hljs-title,
 .hljs-decorator,
 .css .hljs-function {
-  color: #FFC66D;
+  color: #ffc66d;
 }
 
 .diff .hljs-header,
 .hljs-chunk {
-  background-color: #2F33AB;
-  color: #E6E1DC;
+  background-color: #2f33ab;
+  color: #e6e1dc;
   display: inline-block;
   width: 100%;
 }
 
 .diff .hljs-change {
-  background-color: #4A410D;
-  color: #F8F8F8;
+  background-color: #4a410d;
+  color: #f8f8f8;
   display: inline-block;
   width: 100%;
 }
 
 .hljs-addition {
   background-color: #144212;
-  color: #E6E1DC;
+  color: #e6e1dc;
   display: inline-block;
   width: 100%;
 }
 
 .hljs-deletion {
   background-color: #600;
-  color: #E6E1DC;
+  color: #e6e1dc;
   display: inline-block;
   width: 100%;
 }
diff --git a/src/styles/rainbow.css b/src/styles/rainbow.css
index d9ffef6..8e30a94 100644
--- a/src/styles/rainbow.css
+++ b/src/styles/rainbow.css
@@ -5,14 +5,17 @@ Style with support for rainbow parens
 */
 
 .hljs {
-  display: block; padding: 0.5em;
-  background: #474949; color: #D1D9E1;
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
+  background: #474949;
+  color: #d1d9e1;
 }
 
 
 .hljs-body,
 .hljs-collection {
-   color: #D1D9E1;
+   color: #d1d9e1;
 }
 
 .hljs-comment,
@@ -53,13 +56,11 @@ Style with support for rainbow parens
 .hljs-decorator,
 .hljs-built_in,
 .lisp .hljs-title,
-.hljs-identifier
-{
+.hljs-identifier {
   color: #b5bd68;
 }
 
-.hljs-class .hljs-keyword
-{
+.hljs-class .hljs-keyword {
   color: #f2777a;
 }
 
diff --git a/src/styles/school_book.css b/src/styles/school_book.css
index 98a3bd2..c4098b0 100644
--- a/src/styles/school_book.css
+++ b/src/styles/school_book.css
@@ -5,7 +5,9 @@ School Book style from goldblog.com.ua (c) Zaripov Yura <yur4ik7 at ukr.net>
 */
 
 .hljs {
-  display: block; padding: 15px 0.5em 0.5em 30px;
+  display: block;
+  overflow-x: auto;
+  padding: 15px 0.5em 0.5em 30px;
   font-size: 11px !important;
   line-height:16px !important;
 }
@@ -32,7 +34,7 @@ pre{
 .hljs,
 .hljs-subst,
 .hljs-tag .hljs-keyword {
-  color: #3E5915;
+  color: #3e5915;
 }
 
 .hljs-string,
@@ -46,7 +48,6 @@ pre{
 .ruby .hljs-symbol .hljs-string,
 .ruby .hljs-class .hljs-parent,
 .hljs-built_in,
-.sql .hljs-aggregate,
 .django .hljs-template_tag,
 .django .hljs-variable,
 .smalltalk .hljs-class,
@@ -65,7 +66,7 @@ pre{
 .nginx .hljs-built_in,
 .tex .hljs-command,
 .coffeescript .hljs-attribute {
-  color: #2C009F;
+  color: #2c009f;
 }
 
 .hljs-comment,
@@ -77,7 +78,7 @@ pre{
 .hljs-deletion,
 .hljs-shebang,
 .apache .hljs-sqbracket {
-  color: #E60415;
+  color: #e60415;
 }
 
 .hljs-keyword,
@@ -87,7 +88,6 @@ pre{
 .hljs-title,
 .haskell .hljs-type,
 .vbscript .hljs-built_in,
-.sql .hljs-aggregate,
 .rsl .hljs-built_in,
 .smalltalk .hljs-class,
 .xml .hljs-tag .hljs-title,
diff --git a/src/styles/solarized_dark.css b/src/styles/solarized_dark.css
index f520533..6187a41 100644
--- a/src/styles/solarized_dark.css
+++ b/src/styles/solarized_dark.css
@@ -6,6 +6,7 @@ Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums at gmai
 
 .hljs {
   display: block;
+  overflow-x: auto;
   padding: 0.5em;
   background: #002b36;
   color: #839496;
diff --git a/src/styles/solarized_light.css b/src/styles/solarized_light.css
index ad70474..e108289 100644
--- a/src/styles/solarized_light.css
+++ b/src/styles/solarized_light.css
@@ -6,6 +6,7 @@ Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums at gmai
 
 .hljs {
   display: block;
+  overflow-x: auto;
   padding: 0.5em;
   background: #fdf6e3;
   color: #657b83;
diff --git a/src/styles/sunburst.css b/src/styles/sunburst.css
index 07b30c2..5ff1997 100644
--- a/src/styles/sunburst.css
+++ b/src/styles/sunburst.css
@@ -5,8 +5,11 @@ Sunburst-like style (c) Vasily Polovnyov <vast at whiteants.net>
 */
 
 .hljs {
-  display: block; padding: 0.5em;
-  background: #000; color: #f8f8f8;
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
+  background: #000;
+  color: #f8f8f8;
 }
 
 .hljs-comment,
@@ -21,14 +24,14 @@ Sunburst-like style (c) Vasily Polovnyov <vast at whiteants.net>
 .hljs-request,
 .hljs-status,
 .nginx .hljs-title {
-  color: #E28964;
+  color: #e28964;
 }
 
 .hljs-function .hljs-keyword,
 .hljs-sub .hljs-keyword,
 .method,
 .hljs-list .hljs-title {
-  color: #99CF50;
+  color: #99cf50;
 }
 
 .hljs-string,
@@ -40,15 +43,15 @@ Sunburst-like style (c) Vasily Polovnyov <vast at whiteants.net>
 .hljs-date,
 .tex .hljs-command,
 .coffeescript .hljs-attribute {
-  color: #65B042;
+  color: #65b042;
 }
 
 .hljs-subst {
-  color: #DAEFA3;
+  color: #daefa3;
 }
 
 .hljs-regexp {
-  color: #E9C062;
+  color: #e9c062;
 }
 
 .hljs-title,
@@ -59,7 +62,7 @@ Sunburst-like style (c) Vasily Polovnyov <vast at whiteants.net>
 .hljs-decorator,
 .hljs-shebang,
 .hljs-prompt {
-  color: #89BDFF;
+  color: #89bdff;
 }
 
 .hljs-class .hljs-title,
@@ -74,79 +77,79 @@ Sunburst-like style (c) Vasily Polovnyov <vast at whiteants.net>
 .hljs-symbol,
 .ruby .hljs-symbol .hljs-string,
 .hljs-number {
-  color: #3387CC;
+  color: #3387cc;
 }
 
 .hljs-params,
 .hljs-variable,
 .clojure .hljs-attribute {
-  color: #3E87E3;
+  color: #3e87e3;
 }
 
 .css .hljs-tag,
 .hljs-rules .hljs-property,
 .hljs-pseudo,
 .tex .hljs-special {
-  color: #CDA869;
+  color: #cda869;
 }
 
 .css .hljs-class {
-  color: #9B703F;
+  color: #9b703f;
 }
 
 .hljs-rules .hljs-keyword {
-  color: #C5AF75;
+  color: #c5af75;
 }
 
 .hljs-rules .hljs-value {
-  color: #CF6A4C;
+  color: #cf6a4c;
 }
 
 .css .hljs-id {
-  color: #8B98AB;
+  color: #8b98ab;
 }
 
 .hljs-annotation,
 .apache .hljs-sqbracket,
 .nginx .hljs-built_in {
-  color: #9B859D;
+  color: #9b859d;
 }
 
 .hljs-preprocessor,
 .hljs-pragma {
-  color: #8996A8;
+  color: #8996a8;
 }
 
 .hljs-hexcolor,
 .css .hljs-value .hljs-number {
-  color: #DD7B3B;
+  color: #dd7b3b;
 }
 
 .css .hljs-function {
-  color: #DAD085;
+  color: #dad085;
 }
 
 .diff .hljs-header,
 .hljs-chunk,
 .tex .hljs-formula {
-  background-color: #0E2231;
-  color: #F8F8F8;
+  background-color: #0e2231;
+  color: #f8f8f8;
   font-style: italic;
 }
 
 .diff .hljs-change {
-  background-color: #4A410D;
-  color: #F8F8F8;
+  background-color: #4a410d;
+  color: #f8f8f8;
 }
 
 .hljs-addition {
-  background-color: #253B22;
-  color: #F8F8F8;
+  background-color: #253b22;
+  color: #f8f8f8;
 }
 
 .hljs-deletion {
-  background-color: #420E09;
-  color: #F8F8F8;
+  background-color: #420e09;
+  color: #f8f8f8;
 }
 
 .coffeescript .javascript,
diff --git a/src/styles/tomorrow-night-blue.css b/src/styles/tomorrow-night-blue.css
index dfe2675..506b73c 100644
--- a/src/styles/tomorrow-night-blue.css
+++ b/src/styles/tomorrow-night-blue.css
@@ -77,6 +77,7 @@
 
 .hljs {
   display: block;
+  overflow-x: auto;
   background: #002451;
   color: white;
   padding: 0.5em;
diff --git a/src/styles/tomorrow-night-bright.css b/src/styles/tomorrow-night-bright.css
index 4ad5d25..24b03bd 100644
--- a/src/styles/tomorrow-night-bright.css
+++ b/src/styles/tomorrow-night-bright.css
@@ -76,6 +76,7 @@
 
 .hljs {
   display: block;
+  overflow-x: auto;
   background: black;
   color: #eaeaea;
   padding: 0.5em;
diff --git a/src/styles/tomorrow-night-eighties.css b/src/styles/tomorrow-night-eighties.css
index 08b49c6..219019d 100644
--- a/src/styles/tomorrow-night-eighties.css
+++ b/src/styles/tomorrow-night-eighties.css
@@ -76,6 +76,7 @@
 
 .hljs {
   display: block;
+  overflow-x: auto;
   background: #2d2d2d;
   color: #cccccc;
   padding: 0.5em;
diff --git a/src/styles/tomorrow-night.css b/src/styles/tomorrow-night.css
index c269b17..cb8ceb7 100644
--- a/src/styles/tomorrow-night.css
+++ b/src/styles/tomorrow-night.css
@@ -77,6 +77,7 @@
 
 .hljs {
   display: block;
+  overflow-x: auto;
   background: #1d1f21;
   color: #c5c8c6;
   padding: 0.5em;
diff --git a/src/styles/tomorrow.css b/src/styles/tomorrow.css
index 3bdead6..2aa9f76 100644
--- a/src/styles/tomorrow.css
+++ b/src/styles/tomorrow.css
@@ -74,6 +74,7 @@
 
 .hljs {
   display: block;
+  overflow-x: auto;
   background: white;
   color: #4d4d4c;
   padding: 0.5em;
diff --git a/src/styles/vs.css b/src/styles/vs.css
index bf33f0f..91451eb 100644
--- a/src/styles/vs.css
+++ b/src/styles/vs.css
@@ -4,8 +4,11 @@ Visual Studio-like style based on original C# coloring by Jason Diamond <jason at d
 
 */
 .hljs {
-  display: block; padding: 0.5em;
-  background: white; color: black;
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
+  background: white;
+  color: black;
 }
 
 .hljs-comment,
@@ -19,7 +22,7 @@ Visual Studio-like style based on original C# coloring by Jason Diamond <jason at d
 
 .hljs-keyword,
 .hljs-id,
-.hljs-built_in,
+.hljs-built_in,.css
 .smalltalk .hljs-class,
 .hljs-winutils,
 .bash .hljs-variable,
@@ -37,10 +40,8 @@ Visual Studio-like style based on original C# coloring by Jason Diamond <jason at d
 .hljs-parent,
 .hljs-tag .hljs-value,
 .hljs-rules .hljs-value,
-.hljs-rules .hljs-value .hljs-number,
 .ruby .hljs-symbol,
 .ruby .hljs-symbol .hljs-string,
-.hljs-aggregate,
 .hljs-template_tag,
 .django .hljs-variable,
 .hljs-addition,
@@ -84,6 +85,6 @@ Visual Studio-like style based on original C# coloring by Jason Diamond <jason at d
 .vhdl .hljs-typename { font-weight: bold; }
 .vhdl .hljs-string { color: #666666; }
 .vhdl .hljs-literal { color: #a31515; }
-.vhdl .hljs-attribute { color: #00B0E8; }
+.vhdl .hljs-attribute { color: #00b0e8; }
 
 .xml .hljs-attribute { color: #f00; }
diff --git a/src/styles/xcode.css b/src/styles/xcode.css
index 57bd748..1cf3b0e 100644
--- a/src/styles/xcode.css
+++ b/src/styles/xcode.css
@@ -5,14 +5,16 @@ XCode style (c) Angel Garcia <angelgarcia.mail at gmail.com>
 */
 
 .hljs {
-  display: block; padding: 0.5em;
-  background: #fff; color: black;
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
+  background: #fff;
+  color: black;
 }
 
 .hljs-comment,
 .hljs-template_comment,
-.hljs-javadoc,
-.hljs-comment * {
+.hljs-javadoc {
   color: #006a00;
 }
 
@@ -61,7 +63,6 @@ XCode style (c) Angel Garcia <angelgarcia.mail at gmail.com>
 .hljs-prompt,
 .hljs-hexcolor,
 .hljs-rules .hljs-value,
-.css .hljs-value .hljs-number,
 .hljs-symbol,
 .hljs-symbol .hljs-string,
 .hljs-number,
@@ -102,7 +103,7 @@ XCode style (c) Angel Garcia <angelgarcia.mail at gmail.com>
 
 .css .hljs-class,
 .css .hljs-id {
-  color: #9B703F;
+  color: #9b703f;
 }
 
 .hljs-value .hljs-important {
@@ -111,13 +112,13 @@ XCode style (c) Angel Garcia <angelgarcia.mail at gmail.com>
 }
 
 .hljs-rules .hljs-keyword {
-  color: #C5AF75;
+  color: #c5af75;
 }
 
 .hljs-annotation,
 .apache .hljs-sqbracket,
 .nginx .hljs-built_in {
-  color: #9B859D;
+  color: #9b859d;
 }
 
 .hljs-preprocessor,
@@ -127,7 +128,7 @@ XCode style (c) Angel Garcia <angelgarcia.mail at gmail.com>
 }
 
 .tex .hljs-formula {
-  background-color: #EEE;
+  background-color: #eee;
   font-style: italic;
 }
 
@@ -138,15 +139,15 @@ XCode style (c) Angel Garcia <angelgarcia.mail at gmail.com>
 }
 
 .diff .hljs-change {
-  background-color: #BCCFF9;
+  background-color: #bccff9;
 }
 
 .hljs-addition {
-  background-color: #BAEEBA;
+  background-color: #baeeba;
 }
 
 .hljs-deletion {
-  background-color: #FFC8BD;
+  background-color: #ffc8bd;
 }
 
 .hljs-comment .hljs-yardoctag {
diff --git a/src/styles/zenburn.css b/src/styles/zenburn.css
index f6cb098..8da11a2 100644
--- a/src/styles/zenburn.css
+++ b/src/styles/zenburn.css
@@ -6,9 +6,11 @@ based on dark.css by Ivan Sagalaev
 */
 
 .hljs {
-  display: block; padding: 0.5em;
-  background: #3F3F3F;
-  color: #DCDCDC;
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
+  background: #3f3f3f;
+  color: #dcdcdc;
 }
 
 .hljs-keyword,
@@ -20,25 +22,25 @@ based on dark.css by Ivan Sagalaev
 .hljs-request,
 .hljs-status,
 .clojure .hljs-attribute {
-  color: #E3CEAB;
+  color: #e3ceab;
 }
 
 .django .hljs-template_tag,
 .django .hljs-variable,
 .django .hljs-filter .hljs-argument {
-  color: #DCDCDC;
+  color: #dcdcdc;
 }
 
 .hljs-number,
 .hljs-date {
-  color: #8CD0D3;
+  color: #8cd0d3;
 }
 
 .dos .hljs-envvar,
 .dos .hljs-stream,
 .hljs-variable,
 .apache .hljs-sqbracket {
-  color: #EFDCBC;
+  color: #efdcbc;
 }
 
 .dos .hljs-flow,
@@ -47,12 +49,12 @@ based on dark.css by Ivan Sagalaev
 .python .hljs-built_in,
 .hljs-literal,
 .tex .hljs-special {
-  color: #EFEFAF;
+  color: #efefaf;
 }
 
 .diff .hljs-chunk,
 .hljs-subst {
-  color: #8F8F8F;
+  color: #8f8f8f;
 }
 
 .dos .hljs-keyword,
@@ -65,14 +67,14 @@ based on dark.css by Ivan Sagalaev
 .nginx .hljs-built_in,
 .tex .hljs-command,
 .hljs-prompt {
-    color: #efef8f;
+  color: #efef8f;
 }
 
 .dos .hljs-winutils,
 .ruby .hljs-symbol,
 .ruby .hljs-symbol .hljs-string,
 .ruby .hljs-string {
-  color: #DCA3A3;
+  color: #dca3a3;
 }
 
 .diff .hljs-deletion,
@@ -81,7 +83,6 @@ based on dark.css by Ivan Sagalaev
 .hljs-preprocessor,
 .hljs-pragma,
 .hljs-built_in,
-.sql .hljs-aggregate,
 .hljs-javadoc,
 .smalltalk .hljs-class,
 .smalltalk .hljs-localvars,
@@ -92,7 +93,7 @@ based on dark.css by Ivan Sagalaev
 .apache .hljs-cbracket,
 .tex .hljs-formula,
 .coffeescript .hljs-attribute {
-  color: #CC9393;
+  color: #cc9393;
 }
 
 .hljs-shebang,
@@ -102,7 +103,7 @@ based on dark.css by Ivan Sagalaev
 .hljs-template_comment,
 .hljs-pi,
 .hljs-doctype {
-  color: #7F9F7F;
+  color: #7f9f7f;
 }
 
 .coffeescript .javascript,
diff --git a/src/test.html b/src/test.html
index 435b0c7..bd9c9dd 100755
--- a/src/test.html
+++ b/src/test.html
@@ -47,8 +47,14 @@
   <link rel="alternate stylesheet" title="Atelier Seaside - Light" href="styles/atelier-seaside.light.css">
   <link rel="alternate stylesheet" title="Paraíso - Dark" href="styles/paraiso.dark.css">
   <link rel="alternate stylesheet" title="Paraíso - Light" href="styles/paraiso.light.css">
+  <link rel="alternate stylesheet" title="Colorbrewer" href="styles/color-brewer.css">
+  <link rel="alternate stylesheet" title="Codepen.io Embed" href="styles/codepen-embed.css">
+  <link rel="alternate stylesheet" title="Kimbie - Dark" href="styles/kimbie.dark.css">
+  <link rel="alternate stylesheet" title="Kimbie - Light" href="styles/kimbie.light.css">
+  <link rel="alternate stylesheet" title="Hybrid" href="styles/hybrid.css">
 
   <style>
+    /* Base styles */
     body {
       font: small Arial, sans-serif;
     }
@@ -58,7 +64,9 @@
       margin-bottom: 0.5em;
     }
     table {
-      width: 100%; padding: 0; border-collapse: collapse;
+      width: 100%;
+      padding: 0;
+      border-collapse: collapse;
     }
     th {
       width: 12em;
@@ -72,22 +80,42 @@
       text-align: left;
     }
     pre {
-      margin: 0; font-size: medium;
+      margin: 0;
+      font-size: medium;
     }
-    #switch {
-      overflow: auto; width: 67em;
+    .hljs-debug {
+      color: red;
+    }
+    /* Style switcher */
+    ul#switch {
+      width: 66em;
+      -webkit-column-width: 15em;
+      -webkit-column-gap: 2em;
+      -moz-column-width: 15em;
+      -moz-column-gap: 2em;
+      -o-column-width: 15em;
+      -o-column-gap: 2em;
+      column-width: 15em;
+      column-gap: 2em;
       list-style: none;
-      padding: 0; margin: 0;
+      overflow: auto;
+      padding: 0;
+      margin: 0;
     }
-    #switch li {
-      float: left; width: 12em;
-      padding: 0.1em; margin: 0.1em 1em 0.1em 0;
+    ul#switch li {
+      -webkit-column-break-inside: avoid;
+      -moz-column-break-inside: avoid;
+      -o-column-break-inside: avoid;
+      column-break-inside: avoid;
+      padding: 0.1em;
+      margin: 0.1em 1em 0.1em 0;
       background: #EEE;
       cursor: pointer;
     }
-    #switch li.current {
+    ul#switch li.current {
       background: #CCC;
     }
+    /* Tests */
     .test {
       color: #888;
       font-weight: normal;
@@ -99,7 +127,7 @@
     .passed {
       color: green;
     }
-    .failed {
+    .failed, .failed a {
       color: red;
     }
     .code {
@@ -108,6 +136,13 @@
     .code .hljs-keyword {
       font-weight: bold;
     }
+    /* Export form */
+    #export_from, #export_to {
+      width: 98%;
+    }
+    address {
+      margin-top: 4em;
+    }
   </style>
 
   <script src="../build/highlight.pack.js"></script>
@@ -133,31 +168,29 @@
           }
       }
 
-
       attach(window, 'load', function() {
           var current = null;
 
           var info = {};
           var links = document.getElementsByTagName('link');
-          var ul = document.createElement('ul')
+          var ul = document.createElement('ul');
 
           for (var i = 0; (link = links[i]); i++) {
-              if (link.getAttribute('rel').indexOf('style') != -1
-                  && link.title) {
-
+              if ((link.getAttribute('rel').indexOf('style') != -1) && link.title) {
                   var title = link.title;
 
                   info[title] = {
-                  'link': link,
-                  'li': document.createElement('li')
-                  }
+                      'link': link,
+                      'li': document.createElement('li')
+                  };
 
-                  ul.appendChild(info[title].li)
+                  ul.appendChild(info[title].li);
                   info[title].li.title = title;
 
                   info[title].link.disabled = true;
 
                   info[title].li.appendChild(document.createTextNode(title));
+
                   attach(info[title].li, 'click', (function (el) {
                       return function() {
                           current.li.className = '';
@@ -165,11 +198,12 @@
                           current = el;
                           current.li.className = 'current';
                           current.link.disabled = false;
-                      }})(info[title]));
+                      }
+                  })(info[title]));
               }
           }
 
-          current = info['Default']
+          current = info['Default'];
           current.li.className = 'current';
           current.link.disabled = false;
 
@@ -177,9 +211,81 @@
           container = document.getElementById(container_id);
           container.appendChild(ul);
       });
-
   })('styleswitcher');
   </script>
+
+  <script>
+  // Test result detection © Ivan Sagalaev <maniac at softwaremaniacs.org>
+  function testDetection() {
+      if (!hljs.initHighlighting.called) {
+          window.setTimeout(testDetection, 500);
+          return;
+      }
+      var table = document.getElementById('autotest');
+      var tds = table.getElementsByTagName('TD');
+      var failed = [];
+      var passed, result
+      for (var i = 0; i < tds.length; i++) {
+          var tdClass = tds[i].className;
+          tds[i].id = 'anchor-' + tdClass.replace(/[^\w]/, '-');
+          if (hljs.getLanguage(tdClass)) {
+              var code = tds[i].getElementsByTagName('CODE')[0];
+              var langClass = code.className.replace('hljs', '').trim();
+              passed = (tdClass == langClass);
+              result = document.createElement('DIV');
+              result.className = 'test';
+              result.innerHTML = '<var class="'+ (passed ? 'passed' : 'failed') +'">' + langClass + '</var>';
+              result.innerHTML += ' (' + code.result.re + ')';
+              if (code.second_best) {
+                  result.innerHTML += '<br>' + code.second_best.language + ' (' + code.second_best.re + ')';
+              }
+              tds[i].parentNode.getElementsByTagName('th')[0].appendChild(result);
+	      if (!passed) {
+	          failed.push('<a href="#' + tds[i].id + '">' + tdClass + '</a>');
+	      }
+          } else {
+              tds[i].parentNode.style.display = 'none';
+          }
+      }
+      var summary = document.getElementById('summary');
+      summary.innerHTML = failed.length ? ('Failed tests: ' + failed.join(', ')) : 'All tests passed';
+      summary.className = failed.length ? 'failed' : 'passed';
+  }
+  testDetection();
+  </script>
+
+  <script>
+  // Highlighted code export © Vladimir Gubarkov <xonixx at gmail.com>
+  String.prototype.escape = function() {
+      return this.replace(/&/gm, '&').replace(/</gm, '<').replace(/>/gm, '>');
+  };
+
+  function ExportDoIt() {
+      var export_from = document.getElementById("export_from");
+      var export_to = document.getElementById("export_to");
+      var export_view = document.getElementById("export_view");
+      var selector = document.getElementById("langSelector");
+      var selectedLang = selector.options[selector.selectedIndex].value.toLowerCase();
+      if (selectedLang) {
+          export_view.innerHTML = '<pre><code class="' + selectedLang + '">' + export_from.value.escape() + "</code></pre>";
+      } else { // try auto
+          export_view.innerHTML = '<pre><code>' + export_from.value.escape() + "</code></pre>";
+      }
+      hljs.highlightBlock(export_view.firstChild.firstChild);
+      export_to.value = export_view.innerHTML;
+  }
+
+  function ExportCopyToBuffer(textToCopy) {
+      if (window.clipboardData) { // IE
+          window.clipboardData.setData("Text", textToCopy);
+      } else if (window.netscape) { // FF
+          // from http://developer.mozilla.org/en/docs/Using_the_Clipboard
+          netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
+          var gClipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"].getService(Components.interfaces.nsIClipboardHelper);
+          gClipboardHelper.copyString(textToCopy);
+      }
+  }
+  </script>
 <body>
 
 <p>This is a demo/test page showing all languages supported by <a href="http://highlightjs.org/">highlight.js</a>.
@@ -245,6 +351,13 @@ module ABC::DEF
   def ==(other) other == self end
 end
 
+class Car < ActiveRecord::Base
+  has_many :wheels, :class_name => 'Wheel', :foreign_key => 'car_id'
+end
+omega = -> { 'alpha' }
+alpha = ->(arg) { arg*2 }
+hash = {1 => 'one', 2 => 'two'}
+
 anIdentifier = an_identifier
 Constant = 1
 render action: :new
@@ -254,6 +367,26 @@ str =~ %r{foo|bar|buz$}
 str =~ %r!foo|bar$!
 str =~ %r[foo|bar$]
 str =~ %r(\(foo|bar\)$)
+
+2.0.0p0 :001 > ['some']
+ => ["some"]
+2.0.0p0 :002 > if true
+2.0.0p0 :003?>   "yop"
+2.0.0p0 :004?>   end
+ => "yop"
+
+>> obj = OpenStruct.new :integer => 987, :symbol => :so_great
+=> #<OpenStruct integer=987, symbol=:so_great>
+>> [obj,obj,obj]
+=> [#<OpenStruct integer=987, symbol=:so_great>, #<OpenStruct integer=987, symbol=:so_great>, #<OpenStruct integer=987, symbol=:so_great>]
+>> {1 => obj, 2 => obj}
+=> {1=>#<OpenStruct integer=987, symbol=:so_great>, 2=>#<OpenStruct integer=987, symbol=:so_great>}
+>> if 10 > 20
+>> "YEAH"
+>> else
+?> "NO"
+>> end
+=> "NO"
 </code></pre>
 
   <tr>
@@ -276,6 +409,35 @@ str =~ %r(\(foo|bar\)$)
 </code></pre>
 
   <tr>
+    <th>Nix
+    <td class="nix">
+<pre><code>{ stdenv, foo, bar ? false, ... }:
+
+/*
+ * foo
+ */
+
+let
+  a = 1; # just a comment
+  b = null;
+  c = toString 10;
+in stdenv.mkDerivation rec {
+  name = "foo-${version}";
+  version = "1.3";
+
+  configureFlags = [ "--with-foo2" ] ++ stdenv.lib.optional bar "--with-foo=${ with stdenv.lib; foo }"
+
+  postInstall = ''
+    ${ if true then "--${test}" else false }
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://nixos.org;
+  };
+}
+</code></pre>
+
+  <tr>
     <th>Perl
     <td class="perl">
 <pre><code># loads object
@@ -301,6 +463,10 @@ sub load
     }
   }
   $o->save if delete $o->{'_save_after_load'};
+
+  # GH-117
+  my $g = glob("/usr/bin/*");
+
   return $o;
 }
 
@@ -324,6 +490,11 @@ abstract class URI extends BaseURI implements Factory
 {
     abstract function test();
 
+    public static $st1 = 1;
+    const ME = "Yo";
+    var $list = NULL;
+    private $var;
+
     /**
      * Returns a URI
      *
@@ -342,6 +513,9 @@ line description';
             throw new Zend_Uri_Exception('Illegal scheme');
         }
 
+       	$this->var = 0 - self::$st;
+        $this->list = list(Array("1"=> 2, 2=>self::ME));
+
         return [
             'uri'   => $uri,
             'value' => null,
@@ -349,6 +523,8 @@ line description';
     }
 }
 
+echo URI::ME . URI::$st1;
+
 __halt_compiler () ; datahere
 datahere
 datahere */
@@ -791,6 +967,26 @@ a {
 }</code></pre>
 
   <tr>
+    <th>TypeScript
+    <td class="typescript">
+<pre><code>class MyClass {
+    public static myValue: string;
+    constructor(init: string) {
+      this.myValue = init;
+    }
+  }
+  import fs = require("fs");
+  module MyModule {
+    export interface MyInterface extends OtherInterface {
+      myProperty: any;
+    }
+  }
+  declare magicNumber number;
+  myArray.forEach(() => {
+    // fat arrow syntax
+  });</code></pre>
+
+  <tr>
     <th>CoffeeScript
     <td class="coffeescript">
 <pre><code># Divisions
@@ -880,6 +1076,40 @@ OPERATOR = /// ^ (
 }</code></pre>
 
   <tr>
+     <th>Haxe</th>
+     <td class="haxe">
+<pre><code>
+// quicksort example from http://haxe.org/doc/snip/quicksort
+class Quicksort {
+
+    static var arr = [4,8,0,3,9,1,5,2,6,7];
+
+    static function quicksort( lo : Int, hi : Int ) : Void {
+        var i = lo;
+        var j = hi;
+        var buf = arr;
+        var p = buf[(lo+hi)>>1];
+        while( i <= j ) {
+            while( arr[i] > p ) i++;
+            while( arr[j] < p ) j--;
+            if( i <= j ) {
+                var t = buf[i];
+                buf[i++] = buf[j];
+                buf[j--] = t;
+            }
+        }
+        if( lo < j ) quicksort( lo, j );
+        if( i < hi ) quicksort( i, hi );
+    }
+
+    static function main() {
+        quicksort( 0, arr.length-1 );
+        trace(arr);
+    }
+}
+</code></pre>
+
+  <tr>
     <th>VBScript
     <td class="vbscript">
 <pre><code>' creating configuration storage and initializing with default values
@@ -960,6 +1190,136 @@ End Namespace
 </code></pre>
 
   <tr>
+    <th>Protocol Buffers
+    <td class="protobuf">
+<pre><code>package languages.protobuf;
+
+option java_package = "org.highlightjs.languages.protobuf";
+
+message Customer {
+  required int64 customer_id = 1;
+  optional string name = 2;
+  optional string real_name = 3 [default = "Anonymous"];
+  optional Gender gender = 4;
+  repeated string email_addresses = 5;
+
+  optional bool is_admin = 6 [default = false]; // or should this be a repeated field in Account?
+
+  enum Gender {
+    MALE = 1,
+    FEMALE = 2
+  }
+}
+
+service CustomerSearch {
+  rpc FirstMatch(CustomerRequest) returns (CustomerResponse);
+  rpc AllMatches(CustomerRequest) returns (CustomerResponse);
+}</code></pre>
+
+  <tr>
+  <th>Cap’n Proto
+  <td class="capnproto">
+<pre><code>@0xdbb9ad1f14bf0b36;  # unique file ID, generated by `capnp id`
+
+struct Person {
+  name @0 :Text;
+  birthdate @3 :Date;
+
+  email @1 :Text;
+  phones @2 :List(PhoneNumber);
+
+  struct PhoneNumber {
+    number @0 :Text;
+    type @1 :Type;
+
+    enum Type {
+      mobile @0;
+      home @1;
+      work @2;
+    }
+  }
+}
+
+struct Date {
+  year @0 :Int16;
+  month @1 :UInt8;
+  day @2 :UInt8;
+  flags @3 :List(Bool) = [ true, false, false, true ];
+}
+
+interface Node {
+  isDirectory @0 () -> (result :Bool);
+}
+
+interface Directory extends(Node) {
+  list @0 () -> (list: List(Entry));
+  struct Entry {
+    name @0 :Text;
+    node @1 :Node;
+  }
+
+  create @1 (name :Text) -> (file :File);
+  mkdir @2 (name :Text) -> (directory :Directory)
+  open @3 (name :Text) -> (node :Node);
+  delete @4 (name :Text);
+  link @5 (name :Text, node :Node);
+}
+
+interface File extends(Node) {
+  size @0 () -> (size: UInt64);
+  read @1 (startAt :UInt64 = 0, amount :UInt64 = 0xffffffffffffffff)
+       -> (data: Data);
+  # Default params = read entire file.
+
+  write @2 (startAt :UInt64, data :Data);
+  truncate @3 (size :UInt64);
+}</code></pre>
+
+  <tr>
+    <th>Thrift
+    <td class="thrift">
+<pre><code>namespace * thrift.test
+
+/**
+ * Docstring!
+ */
+enum Numberz
+{
+  ONE = 1,
+  TWO,
+  THREE,
+  FIVE = 5,
+  SIX,
+  EIGHT = 8
+}
+
+const Numberz myNumberz = Numberz.ONE;
+// the following is expected to fail:
+// const Numberz urNumberz = ONE;
+
+typedef i64 UserId
+
+struct Msg
+{
+  1: string message,
+  2: i32 type
+}
+struct NestedListsI32x2
+{
+  1: list<list<i32>> integerlist
+}
+struct NestedListsI32x3
+{
+  1: list<list<list<i32>>> integerlist
+}
+service ThriftTest
+{
+  void        testVoid(),
+  string      testString(1: string thing),
+  oneway void testInit()
+}</code></pre>
+
+  <tr>
     <th>HTTP
     <td class="http">
 <pre><code>POST /task?id=1 HTTP/1.1
@@ -1027,6 +1387,26 @@ do shell script "/bin/echo 'hello'"
 </code></pre>
 
   <tr>
+    <th>Vim Script
+    <td class="vim">
+<pre><code>if foo > 2 || has("gui_running")
+  syntax on
+  set hlsearch
+endif
+
+set autoindent
+
+" switch on highlighting
+function UnComment(fl, ll)
+  while idx >= a:ll
+    let srclines=getline(idx)
+    let dstlines=substitute(srclines, b:comment, "", "")
+    call setline(idx, dstlines)
+  endwhile
+endfunction
+</code></pre>
+
+  <tr>
     <th>Delphi
     <td class="delphi">
 <pre><code>TList = Class(TObject)
@@ -1569,18 +1949,22 @@ void main(void) {
     <td class="sql">
 <pre><code>BEGIN;
 CREATE TABLE "topic" (
+    -- This is the greatest table of all time
     "id" serial NOT NULL PRIMARY KEY,
     "forum_id" integer NOT NULL,
-    "subject" varchar(255) NOT NULL
+    "subject" varchar(255) NOT NULL -- Because nobody likes an empty subject
 );
 ALTER TABLE "topic" ADD CONSTRAINT forum_id FOREIGN KEY ("forum_id") REFERENCES "forum" ("id");
 
 -- Initials
 insert into "topic" ("forum_id", "subject") values (2, 'D''artagnian');
 
-select count(*) from cicero_forum;
+select /* comment */ count(*) from cicero_forum;
 
 -- this line lacks ; at the end to allow people to be sloppy and omit it in one-liners
+/*
+but who cares?
+*/
 COMMIT</code></pre>
 
   <tr>
@@ -1911,6 +2295,44 @@ qt5_use_modules(myproject Widgets)
 </code></pre>
 
   <tr>
+    <th>NSIS
+    <td class="nsis">
+<pre><code>/*
+  NSIS Scheme
+  for highlight.js
+*/
+
+; Includes
+!include MUI2.nsh
+
+; Settings
+Name "installer_name"
+OutFile "installer_name.exe"
+RequestExecutionLevel user
+CRCCheck on
+!ifdef x64
+  InstallDir "$PROGRAMFILES64\installer_name"
+!else
+  InstallDir "$PROGRAMFILES\installer_name"
+!endif
+
+; Pages
+!insertmacro MUI_PAGE_INSTFILES
+
+; Sections
+Section "section_name" section_index
+  # your code here
+SectionEnd
+
+; Functions
+Function .onInit
+
+  MessageBox MB_OK "Here comes a$\n$\rline-break!"
+
+FunctionEnd
+</code></pre>
+
+  <tr>
     <th>Axapta
     <td class="axapta">
 <pre><code>class ExchRateLoadBatch extends RunBaseBatch {
@@ -2129,40 +2551,16 @@ put "blog,index" into gControllerHandlers
 
 
 command blog
+  -- simple comment
   put "Hello World!" into sTest
+  # ANOTHER COMMENT
   put "form,url,asset" into tHelpers
   rigLoadHelper tHelpers
 end blog
 
-
-command index
-  -- simple comment
-  put "YourPageTitle" into gData["pageTitle"]
-
-  # ANOTHER COMMENT
-  get rigLoadView("blogView")
-end index
-
-
 /*Hello
 block comment!*/
 
-
-command rigCommand pParam1 pParam2
-  put empty into sEmptyLocal
-  // comment
-  put "test" contains "es" into tTemp
-  put "test" & $_POST["post"] into tTestVar
-  put rigFunction(tTestVar) into gData["arrayVal"]
-end rigCommand
-
-
-function rigFunction pParam
-  rigAnotherCommand pParamA, pPAramB
-  return "bla" && pParam & comma
-end rigFunction
-
-
 function myFunction
   if the secs > 2000000000 then
     put "Welcome to the future!"
@@ -2283,12 +2681,21 @@ pingUDPPort s a = sendTo s (Strict.singleton 0) a >> return ()
 %% backwards compatibility
 -export([listen/1, listen/2, listen/3, listen/4, stop/1]).
 
+if L =/= [] ->      % If L is not empty
+    sum(L) / count(L);
+true ->
+    error
+end.
+
 %% state
 -record(state, {
     cm,
     channel
    }).
 
+-spec foo(integer()) -> integer().
+foo(X) -> 1 + X.
+
 test(Foo)->Foo.
 
 init([Shell, Exec]) ->
@@ -2361,14 +2768,65 @@ ok
 </code></pre>
 
   <tr>
+    <th>Elixir</th>
+    <td class="elixir">
+<pre><code>defrecord Person, first_name: nil, last_name: "Dudington" do
+  def name record do # huh ?
+    "#{record.first_name} #{record.last_name}"
+  end
+end
+
+defrecord User, name: "José", age: 25
+
+guy = Person.new first_name: "Guy"
+guy.name
+
+defmodule ListServer do
+  @moduledoc """
+  This module provides an easy to use ListServer, useful for keeping
+  lists of things.
+  """
+  use GenServer.Behaviour
+  alias Foo.Bar
+
+  ### Public API
+  @doc """
+  Starts and links a new ListServer, returning {:ok, pid}
+
+  ## Example
+
+    iex> {:ok, pid} = ListServer.start_link
+
+  """
+  def start_link do
+    :gen_server.start_link({:local, :list}, __MODULE__, [], [])
+  end
+
+  ### GenServer API
+  def init(list) do
+    {:ok, list}
+  end
+
+  # Clear the list
+  def handle_cast :clear, list do
+    {:noreply, []}
+  end
+end
+
+{:ok, pid} = ListServer.start_link
+pid <- {:foo, "bar"}
+
+greeter = fn(x) -> IO.puts "hey #{x}" end
+greeter.("Bob")
+
+</code></pre>
+
+  <tr>
     <th>Rust
     <td class="rust">
 <pre>
 <code>use std;
 
-import std::io;
-export fac, test1;
-
 123;                               // type int
 123u;                              // type uint
 123_u;                             // type uint
@@ -2381,6 +2839,16 @@ export fac, test1;
 0.1f32;                            // type f32
 12E+99_f64;                        // type f64
 
+'a';
+'\n';
+'\x1A';
+'\u12AS';
+'\U1234ASDF';
+
+r"hello";
+r###"world"###;
+r##" "### "# "##;
+
 /* Factorial */
 fn fac(n: int) -> int {
     let s: str = "This is
@@ -2388,6 +2856,7 @@ a multi-line string.
 
 It ends with an unescaped '\"'.";
     let c: char = 'Ф';
+    let r: str = r##" raw string "##;
 
     let result = 1, i = 1;
     while i <= n { // No parens around the condition
@@ -2406,11 +2875,7 @@ let x = id::<int>(10);
 #[path = "foo.rs"]
 mod foo;
 
-iface seq<T> {
-    fn len() -> uint;
-}
-
-impl <T> of seq<T> for [T] {
+impl <T> Seq<T> for [T] {
     fn len() -> uint { vec::len(self) }
     fn iter(b: fn(T)) {
         for elt in self { b(elt); }
@@ -2418,11 +2883,23 @@ impl <T> of seq<T> for [T] {
 }
 
 enum list<T> {
-    nil;
-    cons(T, @list<T>);
+    Nil;
+    Cons(T, @list<T>);
 }
 
-let a: list<int> = cons(7, @cons(13, @nil));
+let a: list<int> = Cons(7, @cons(13, @nil));
+
+struct Baz<'a> {
+    baz: &'a str,
+}
+
+'h: for i in range(0,10) {
+    'g: loop {
+        if i % 2 == 0 { continue 'h; }
+        if i == 9 { break 'h; }
+        break 'g;
+    }
+}
 </code></pre>
 
   <tr>
@@ -2709,44 +3186,237 @@ return
 
 8=FIX.4.29=035=849=SENDERTEST56=TARGETTEST34=0000000152652=20120429-13:30:08.1371=ABC1234511=2012abc123414=10017=20125432120=030=NYSE31=108.2032=10038=10039=240=147=A54=555=BRK59=260=20120429-13:30:08.00065=B76=BROKER84=0100=NYSE111=100150=2151=0167=CS377=N10000=SampleCustomTag10=123
 </code></pre>
-</table>
 
-<script>
-  function testDetection() {
-    if (!hljs.initHighlighting.called) {
-      window.setTimeout(testDetection, 500);
-      return;
+  <tr>
+    <th>x86asm</th>
+    <td class="x86asm">
+<pre>
+<code>section .text
+extern  _MessageBoxA at 16
+%if     __NASM_VERSION_ID__ >= 0x02030000
+safeseh handler         ; register handler as "safe handler"
+%endif
+
+handler:
+        push    dword 1 ; MB_OKCANCEL
+        push    dword caption
+        push    dword text
+        push    dword 0
+        call    _MessageBoxA at 16
+        sub     eax,1   ; incidentally suits as return value
+                        ; for exception handler
+        ret
+
+global  _main
+_main:  push    dword handler
+        push    dword [fs:0]
+        mov     dword [fs:0], esp
+        xor     eax,eax
+        mov     eax, dword[eax]   ; cause exception
+        pop     dword [fs:0]      ; disengage exception handler
+        add     esp, 4
+        ret
+
+avx2:   vzeroupper
+        push      rbx
+        mov       rbx,   rsp
+        sub       rsp,   0h20
+        vmovdqa   ymm0,  [rcx]
+        vpaddb    ymm0,  [rdx]
+        leave
+        ret
+
+text:   db      'OK to rethrow, CANCEL to generate core dump',0
+caption:db      'SEGV',0
+
+section .drectve info
+        db      '/defaultlib:user32.lib /defaultlib:msvcrt.lib '
+</code></pre>
+
+  <tr>
+  <th>Monkey
+      <td class="monkey">
+<pre>
+<code>#IMAGE_FILES="*.png|*.jpg"
+#SOUND_FILES="*.wav|*.ogg"
+#MUSIC_FILES="*.wav|*.ogg"
+#BINARY_FILES="*.bin|*.dat"
+
+Import mojo
+
+' The main class which expends Mojo's 'App' class:
+Class GameApp Extends App
+    Field player:Player
+
+    Method OnCreate:Int()
+        Local img:Image = LoadImage("player.png")
+        Self.player = New Player()
+        SetUpdateRate(60)
+
+        Return 0
+    End
+
+    Method OnUpdate:Int()
+        player.x += HALFPI
+
+        If (player.x > 100) Then
+            player.x = 0
+        Endif
+
+        Return 0
+    End
+
+    Method OnRender:Int()
+        Cls(32, 64, 128)
+        player.Draw()
+
+        player = Null
+        Return 0
+    End
+End
+</code></pre>
+
+  <tr>
+    <th>Gherkin
+    <td class="gherkin">
+<pre><code># language: en
+Feature: Addition
+  In order to avoid silly mistakes
+  As a math idiot
+  I want to be told the sum of two numbers
+
+  @this_is_a_tag
+  Scenario Outline: Add two numbers
+    * I have a calculator
+    Given I have entered <input_1> into the calculator
+    And I have entered <input_2> into the calculator
+    When I press <button>
+    Then the result should be <output> on the screen
+    And I have a string like
+    """
+    Here is
+    some
+    multiline text
+    """
+
+  Examples:
+    | input_1 | input_2 | button | output |
+    | 20      | 30      | add    | 50     |
+    | 2       | 5       | add    | 7      |
+    | 0       | 40      | add    | 40     |
+</code></pre>
+
+  <tr>
+    <th>Nimrod
+    <td class="nimrod">
+<pre><code>
+import module1, module2, module3
+from module4 import nil
+
+type
+  TFoo = object ## Doc comment
+    a: int32
+  PFoo = ref TFoo
+
+proc do_stuff314(param_1: TFoo, par2am: var PFoo): PFoo {.exportc: "dostuff" .} =
+  # Regular comment
+  discard """
+  dfag
+sdfg""
+"""
+  result = nil
+
+method abc(a: TFoo) = discard 1u32 + 0xabcdefABCDEFi32 + 0o01234567i8 + 0b010
+
+discard rawstring"asdf""adfa"
+var normalstring = "asdf"
+let a: uint32 = 0xFFaF'u32
+</code></pre>
+
+  <tr>
+    <th>Swift
+    <td class="swift">
+<pre><code>extension MyClass : Interface {
+    class func unarchiveFromFile<A>(file : A, (Int,Int) -> B) -> SKNode? {
+        let path: String = bundle.pathForResource(file, ofType: "file\(name + 5).txt")
+        let funnyNumber = 3 + 0xC2.15p2 * (1_000_000.000_000_1 - 000123.456) + 0o21
+        var sceneData = NSData.dataWithContentsOfFile(path, options: .DataReadingMappedIfSafe, error: nil)
+        /* a comment /* with a nested comment */ and the end */
     }
-    var table = document.getElementById('autotest');
-    var tds = table.getElementsByTagName('TD');
-    var failed = [];
-    for (var i = 0; i < tds.length; i++) {
-      var tdClass = tds[i].className;
-      if (!hljs.getLanguage(tdClass)) {
-        tds[i].parentNode.style.display = 'none';
-        continue;
-      }
-      var code = tds[i].getElementsByTagName('CODE')[0];
-      var langClass = code.className.replace('hljs', '').trim();
-      var passed = tdClass == langClass;
-      var result = document.createElement('DIV');
-      result.className = 'test';
-      result.innerHTML = '<var class="'+ (passed ? 'passed' : 'failed') +'">' + langClass + '</var>';
-      result.innerHTML += ' (' + code.result.re + ')';
-      if (code.second_best) {
-        result.innerHTML += '<br>' + code.second_best.language + ' (' + code.second_best.re + ')';
-      }
-      tds[i].parentNode.getElementsByTagName('th')[0].appendChild(result);
-      if (!passed) {
-        failed.push(tdClass);
-      }
+    @objc override func shouldAutorotate() {
+        return true
     }
-    var summary = document.getElementById('summary');
-    summary.innerHTML = failed.length ? ('Failed tests: ' + failed.join(', ')) : 'All tests passed';
-    summary.className = failed.length ? 'failed' : 'passed';
-  }
-  testDetection();
-</script>
+}
+</code></pre>
+
+  <tr>
+    <th>Gradle
+    <td class="gradle">
+<pre><code>
+apply plugin: 'android'
+
+android {
+    compileSdkVersion 19
+    buildToolsVersion "19.1"
+
+    defaultConfig {
+        minSdkVersion 15
+        targetSdkVersion 19
+        versionCode 5
+        versionName "0.4.4"
+    }
+
+    compileOptions {
+        sourceCompatibility JavaVersion.VERSION_1_7
+        targetCompatibility JavaVersion.VERSION_1_7
+    }
+    signingConfigs {
+        release
+    }
+    buildTypes {
+        release {
+            // runProguard true
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
+            signingConfig signingConfigs.release
+        }
+    }
+}
+
+dependencies {
+    compile fileTree(dir: 'libs', include: ['*.jar'])
+
+    compile 'com.example:example-lib:1.0.0'
+}
+
+
+def propFile = file('../signing.properties')
+if( propFile.canRead() ) {
+    def Properties p = new Properties()
+    p.load(new FileInputStream(propFile))
+
+    if( p!=null
+    &&  p.containsKey("STORE_FILE")
+    &&  p.containsKey('STORE_PASSWORD')
+    &&  p.containsKey('KEY_ALIAS')
+    &&  p.containsKey('KEY_PASSWORD')
+    ) {
+        println "RELEASE_BUILD: Signing..."
+
+        android.signingConfigs.release.storeFile = file( p['STORE_FILE'] )
+        android.signingConfigs.release.storePassword = p['STORE_PASSWORD']
+        android.signingConfigs.release.keyAlias = p['KEY_ALIAS']
+        android.signingConfigs.release.keyPassword = p['KEY_PASSWORD']
+    } else {
+        println "RELEASE_BUILD: Required properties in signing.properties are missing"
+        android.buildTypes.release.signingConfig = null
+    }
+} else {
+    println "RELEASE_BUILD: signing.properties not found"
+    android.buildTypes.release.signingProperties = null
+}
+</code></pre>
+
+</table>
 
 
 <h2>Special tests</h2>
@@ -2811,10 +3481,16 @@ return
       <pre><code class="language-js">var x = '<p>this should <b>not</b> be highlighted as <em>HTML</em>';</code></pre>
 
   <tr>
+    <th>Shortened language prefix (lang)
+    <td>
+      <pre><code class="lang-python">def add_one(x):
+    return x + 1</code></pre>
+
+  <tr>
     <th>Disabled highlighting
     <td>
 <pre><code class="no-highlight"><div id="contents">
-  <p>Hello, World!
+  <p>Hello, World!c
 </div>
 </code></pre>
 
@@ -2824,3 +3500,41 @@ return
 <pre><samp>Computer output</samp></pre>
 
 </table>
+
+<h2>Highlighted code export</h2>
+
+<script type="text/javascript">
+    var langSelectorHtml = '<label>Language <select id="langSelector">';
+    langSelectorHtml += '<option value="">Auto</option>';
+    var languages = hljs.listLanguages();
+    for (var i in languages) {
+        langSelectorHtml += '<option value=\"' + languages[i] + '\">' + languages[i].charAt(0).toUpperCase() + languages[i].substr(1) + '</option>';
+    }
+    langSelectorHtml += '</select></label>';
+    document.write(langSelectorHtml);
+</script>
+
+<table>
+    <tr>
+        <td><textarea rows="20" cols="50" id="export_from"></textarea></td>
+        <td><textarea rows="20" cols="50" id="export_to"></textarea></td>
+    </tr>
+    <tr>
+        <td>Write a code snippet</td>
+        <td>Get HTML to paste anywhere (for actual styles and colors see sample.css)</td>
+    </tr>
+</table>
+<table>
+    <tr>
+        <td><input type="button" value="Export →" onclick="ExportDoIt()"/></td>
+        <td align="right"><input type="button" value="Copy to buffer" onclick="ExportCopyToBuffer(document.getElementById('export_to').value);"/></td>
+    </tr>
+</table>
+<div id="export_view"></div>
+
+<address>
+    Stylesheet switcher: <a href="mailto:voldmar at voldmar.ru">Vladimir Epifanov</a><br>
+    Test result detection: <a href="mailto:maniac at softwaremaniacs.org">Ivan Sagalaev</a><br>
+    Export script: <a href="mailto:xonixx at gmail.com">Vladimir Gubarkov</a><br>
+    Highlighting: <a href="http://highlightjs.org/">highlight.js</a>
+</address>
diff --git a/tools/build.py b/tools/build.py
index a9b7fd2..15459f0 100644
--- a/tools/build.py
+++ b/tools/build.py
@@ -38,15 +38,18 @@ REPLACES = {
     'C_NUMBER_RE': 'CNR',
     'BINARY_NUMBER_RE': 'BNR',
     'RE_STARTERS_RE': 'RSR',
+    'BACKSLASH_ESCAPE': 'BE',
     'APOS_STRING_MODE': 'ASM',
     'QUOTE_STRING_MODE': 'QSM',
-    'BACKSLASH_ESCAPE': 'BE',
+    'PHRASAL_WORDS_MODE': 'PWM',
     'C_LINE_COMMENT_MODE': 'CLCM',
-    'C_BLOCK_COMMENT_MODE': 'CBLCLM',
+    'C_BLOCK_COMMENT_MODE': 'CBCM',
     'HASH_COMMENT_MODE': 'HCM',
+    'NUMBER_MODE': 'NM',
     'C_NUMBER_MODE': 'CNM',
     'BINARY_NUMBER_MODE': 'BNM',
-    'NUMBER_MODE': 'NM',
+    'CSS_NUMBER_MODE': 'CSSNM',
+    'REGEXP_MODE': 'RM',
     'TITLE_MODE': 'TM',
     'UNDERSCORE_TITLE_MODE': 'UTM',
 
@@ -109,8 +112,11 @@ def compress_content(tools_path, content, filetype='js'):
             content = mapnonstrings(content, partial(re.sub, r'\b%s\b' % s, r))
         content = re.sub(r'(block|parentNode)\.cN', r'\1.className', content)
 
-    args = ['java', '-jar', os.path.join(tools_path, 'yuicompressor.jar'), '--type', filetype]
-    p = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
+    try:
+        args = ['java', '-jar', os.path.join(tools_path, 'yuicompressor.jar'), '--type', filetype]
+        p = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
+    except FileNotFoundError as e:
+        raise RuntimeError('Couldn\'t find "%s" which is required for compression to work. You can skip compression with the `-n` option.' % args[0]) from e
     p.stdin.write(content.encode('utf-8'))
     p.stdin.close()
     content = p.stdout.read().decode('utf-8')
@@ -202,13 +208,28 @@ def glue_files(hljs_filename, language_filenames, compressed):
         file_func = strip_read
     return ''.join([hljs] + [wrap_language(f, file_func(f), compressed) for f in language_filenames])
 
-def build_browser(root, build_path, filenames, options, is_amd=False):
+def copy_docs(root, build_path):
+    build_docs_path = os.path.join(build_path, 'docs')
+    os.makedirs(build_docs_path)
+
+    docs_path = os.path.join(root, 'docs')
+    filenames = os.listdir(docs_path)
+    for filename in filenames:
+        if '.rst' in filename:
+            shutil.copyfile(
+                os.path.join(docs_path, filename),
+                os.path.join(build_docs_path, filename)
+            )
+
+def build_browser(root, build_path, filenames, options, is_amd=False, need_copy_docs=True):
     src_path = os.path.join(root, 'src')
     tools_path = os.path.join(root, 'tools')
+
     print('Building %d files:\n%s' % (len(filenames), '\n'.join(filenames)))
     content = glue_files(os.path.join(src_path, 'highlight.js'), filenames, False)
     if is_amd:
         content = 'define(function() {\n%s\nreturn hljs;\n});' % content # AMD wrap
+
     print('Uncompressed size:', len(content.encode('utf-8')))
     if options.compress:
         print('Compressing...')
@@ -216,12 +237,17 @@ def build_browser(root, build_path, filenames, options, is_amd=False):
         print('Compressed size:', len(content.encode('utf-8')))
     utf8_open(os.path.join(build_path, 'highlight.pack.js'), 'w').write(content)
 
+    if need_copy_docs:
+        print('Copying docs...')
+        copy_docs(root, build_path)
+
 def build_amd(root, build_path, filenames, options):
-    build_browser(root, build_path, filenames, options, True)
+    build_browser(root, build_path, filenames, options, True, False)
 
 def build_node(root, build_path, filenames, options):
     src_path = os.path.join(root, 'src')
     os.makedirs(os.path.join(build_path, 'lib', 'languages'))
+
     print('Building %d files:' % len(filenames))
     for filename in filenames:
         print(filename)
@@ -244,7 +270,6 @@ def build_node(root, build_path, filenames, options):
         print('Notice: not compressing files for "node" target.')
 
     print('Copying over Metafiles...')
-
     filenames = ['LICENSE', 'README.md']
     for filename in filenames:
         source = os.path.join(root, filename)
@@ -259,14 +284,19 @@ def build_node(root, build_path, filenames, options):
     content = json.dumps(package, indent=2, ensure_ascii=False)
     utf8_open(os.path.join(build_path, 'package.json'), 'w').write(content)
 
+    print('Copying docs...')
+    copy_docs(root, build_path)
+
 def build_cdn(root, build_path, filenames, options):
     src_path = os.path.join(root, 'src')
     tools_path = os.path.join(root, 'tools')
     if not options.compress:
         print('Notice: forcing compression for "cdn" target')
         options.compress = True
-    build_browser(root, build_path, filenames, options)
+
+    build_browser(root, build_path, filenames, options, False, False)
     os.rename(os.path.join(build_path, 'highlight.pack.js'), os.path.join(build_path, 'highlight.min.js'))
+
     print('Compressing all languages...')
     lang_path = os.path.join(build_path, 'languages')
     os.mkdir(lang_path)
@@ -276,6 +306,7 @@ def build_cdn(root, build_path, filenames, options):
         content = compress_content(tools_path, strip_read(filename))
         content = wrap_language(filename, content, True)
         utf8_open(os.path.join(lang_path, '%s.min.js' % lang_name(filename)), 'w').write(content)
+
     print('Compressing styles...')
     build_style_path = os.path.join(build_path, 'styles')
     src_style_path = os.path.join(src_path, 'styles')

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/highlight.js.git



More information about the Pkg-javascript-commits mailing list