many small updates
[pharext/pharext.org] / public / highlight / CHANGES.md
1 ## Version 8.5
2
3 New languages:
4
5 - *pf.conf* by [Peter Piwowarski][]
6 - *Julia* by [Kenta Sato][]
7 - *Prolog* by [Raivo Laanemets][]
8 - *Docker* by [Alexis Hénaut][]
9 - *Fortran* by [Anthony Scemama][] and [Thomas Applencourt][]
10 - *Kotlin* by [Sergey Mashkov][]
11
12 New Styles:
13
14 - *Agate* by [Taufik Nurrohman][]
15 - *Darkula* by [Jet Brains][]
16 - *Atelier Sulpherpool* by [Bram de Haan][]
17 - *Android Studio* by [Pedro Oliveira][]
18
19 Notable fixes and improvements to existing languages:
20
21 - ES6 features in JavaScript are better supported now by [Gu Yiling][].
22 - Swift now recognizes body-less method definitions.
23 - Single expression functions `def foo, do: ... ` now work in Elixir.
24 - More uniform detection of built-in classes in Objective C.
25 - Fixes for number literals and processor directives in Rust.
26 - HTML `<script>` tag now allows any language, not just JavaScript.
27 - Multi-line comments are supported now in MatLab.
28
29 [Taufik Nurrohman]: https://github.com/tovic
30 [Jet Brains]: https://www.jetbrains.com/
31 [Peter Piwowarski]: https://github.com/oldlaptop
32 [Kenta Sato]: https://github.com/bicycle1885
33 [Bram de Haan]: https://github.com/atelierbram
34 [Raivo Laanemets]: https://github.com/rla
35 [Alexis Hénaut]: https://github.com/AlexisNo
36 [Anthony Scemama]: https://github.com/scemama
37 [Pedro Oliveira]: https://github.com/kanytu
38 [Gu Yiling]: https://github.com/Justineo
39 [Sergey Mashkov]: https://github.com/cy6erGn0m
40 [Thomas Applencourt]: https://github.com/TApplencourt
41
42 ## Version 8.4
43
44 We've got the new [demo page][]! The obvious new feature is the new look, but
45 apart from that it's got smarter: by presenting languages in groups it avoids
46 running 10000 highlighting attempts after first load which was slowing it down
47 and giving bad overall impression. It is now also being generated from test
48 code snippets so the authors of new languages don't have to update both tests
49 and the demo page with the same thing.
50
51 Other notable changes:
52
53 - The `template_comment` class is gone in favor of the more general `comment`.
54 - Number parsing unified and improved across languages.
55 - C++, Java and C# now use unified grammar to highlight titles in
56 function/method definitions.
57 - The browser build is now usable as an AMD module, there's no separate build
58 target for that anymore.
59 - OCaml has got a [comprehensive overhaul][ocaml] by [Mickaël Delahaye][].
60 - Clojure's data structures and literals are now highlighted outside of lists
61 and we can now highlight Clojure's REPL sessions.
62
63 New languages:
64
65 - *AspectJ* by [Hakan Özler][]
66 - *STEP Part 21* by [Adam Joseph Cook][]
67 - *SML* derived by [Edwin Dalorzo][] from OCaml definition
68 - *Mercury* by [mucaho][]
69 - *Smali* by [Dennis Titze][]
70 - *Verilog* by [Jon Evans][]
71 - *Stata* by [Brian Quistorff][]
72
73 [Hakan Özler]: https://github.com/ozlerhakan
74 [Adam Joseph Cook]: https://github.com/adamjcook
75 [demo page]: https://highlightjs.org/static/demo/
76 [Ivan Sagalaev]: https://github.com/isagalaev
77 [Edwin Dalorzo]: https://github.com/edalorzo
78 [mucaho]: https://github.com/mucaho
79 [Dennis Titze]: https://github.com/titze
80 [Jon Evans]: https://github.com/craftyjon
81 [Brian Quistorff]: https://github.com/bquistorff
82 [ocaml]: https://github.com/isagalaev/highlight.js/pull/608#issue-46190207
83 [Mickaël Delahaye]: https://github.com/polazarus
84
85
86 ## Version 8.3
87
88 We streamlined our tool chain, it is now based entirely on node.js instead of
89 being a mix of node.js, Python and Java. The build script options and arguments
90 remained the same, and we've noted all the changes in the [documentation][b].
91 Apart from reducing complexity, the new build script is also faster from not
92 having to start Java machine repeatedly. The credits for the work go to [Jeremy
93 Hull][].
94
95 Some notable fixes:
96
97 - PHP and JavaScript mixed in HTML now live happily with each other.
98 - JavaScript regexes now understand ES6 flags "u" and "y".
99 - `throw` keyword is no longer detected as a method name in Java.
100 - Fixed parsing of numbers and symbols in Clojure thanks to [input from Ivan
101 Kleshnin][ik].
102
103 New languages in this release:
104
105 - *Less* by [Max Mikhailov][]
106 - *Stylus* by [Bryant Williams][]
107 - *Tcl* by [Radek Liska][]
108 - *Puppet* by [Jose Molina Colmenero][]
109 - *Processing* by [Erik Paluka][]
110 - *Twig* templates by [Luke Holder][]
111 - *PowerShell* by [David Mohundro][], based on [the work of Nicholas
112 Blumhardt][ps]
113 - *XL* by [Christophe de Dinechin][]
114 - *LiveScript* by [Taneli Vatanen][] and [Jen Evers-Corvina][]
115 - *ERB* (Ruby in HTML) by [Lucas Mazza][]
116 - *Roboconf* by [Vincent Zurczak][]
117
118 [b]: http://highlightjs.readthedocs.org/en/latest/building-testing.html
119 [Jeremy Hull]: https://github.com/sourrust
120 [ik]: https://twitter.com/IvanKleshnin/status/514041599484231680
121 [Max Mikhailov]: https://github.com/seven-phases-max
122 [Bryant Williams]: https://github.com/scien
123 [Radek Liska]: https://github.com/Nindaleth
124 [Jose Molina Colmenero]: https://github.com/Moliholy
125 [Erik Paluka]: https://github.com/paluka
126 [Luke Holder]: https://github.com/lukeholder
127 [David Mohundro]: https://github.com/drmohundro
128 [ps]: https://github.com/OctopusDeploy/Library/blob/master/app/shared/presentation/highlighting/powershell.js
129 [Christophe de Dinechin]: https://github.com/c3d
130 [Taneli Vatanen]: https://github.com/Daiz-
131 [Jen Evers-Corvina]: https://github.com/sevvie
132 [Lucas Mazza]: https://github.com/lucasmazza
133 [Vincent Zurczak]: https://github.com/vincent-zurczak
134
135
136 ## Version 8.2
137
138 We've finally got [real tests][test] and [continuous testing on Travis][ci]
139 thanks to [Jeremy Hull][] and [Chris Eidhof][]. The tests designed to cover
140 everything: language detection, correct parsing of individual language features
141 and various special cases. This is a very important change that gives us
142 confidence in extending language definitions and refactoring library core.
143
144 We're going to redesign the old [demo/test suite][demo] into an interactive
145 demo web app. If you're confident front-end developer or designer and want to
146 help us with it, drop a comment into [the issue][#542] on GitHub.
147
148 [test]: https://github.com/isagalaev/highlight.js/tree/master/test
149 [demo]: https://highlightjs.org/static/test.html
150 [#542]: https://github.com/isagalaev/highlight.js/issues/542
151 [ci]: https://travis-ci.org/isagalaev/highlight.js
152 [Jeremy Hull]: https://github.com/sourrust
153 [Chris Eidhof]: https://github.com/chriseidhof
154
155 As usually there's a handful of new languages in this release:
156
157 - *Groovy* by [Guillaume Laforge][]
158 - *Dart* by [Maxim Dikun][]
159 - *Dust* by [Michael Allen][]
160 - *Scheme* by [JP Verkamp][]
161 - *G-Code* by [Adam Joseph Cook][]
162 - *Q* from Kx Systems by [Sergey Vidyuk][]
163
164 [Guillaume Laforge]: https://github.com/glaforge
165 [Maxim Dikun]: https://github.com/dikmax
166 [Michael Allen]: https://github.com/bfui
167 [JP Verkamp]: https://github.com/jpverkamp
168 [Adam Joseph Cook]: https://github.com/adamjcook
169 [Sergey Vidyuk]: https://github.com/sv
170
171 Other improvements:
172
173 - [Erik Osheim][] heavily reworked Scala definitions making it richer.
174 - [Lucas Mazza][] fixed Ruby hashes highlighting
175 - Lisp variants (Lisp, Clojure and Scheme) are unified in regard to naming
176 the first symbol in parentheses: it's "keyword" in general case and also
177 "built_in" for built-in functions in Clojure and Scheme.
178
179 [Erik Osheim]: https://github.com/non
180 [Lucas Mazza]: https://github.com/lucasmazza
181
182 ## Version 8.1
183
184 New languages:
185
186 - *Gherkin* by [Sam Pikesley][]
187 - *Elixir* by [Josh Adams][]
188 - *NSIS* by [Jan T. Sott][]
189 - *VIM script* by [Jun Yang][]
190 - *Protocol Buffers* by [Dan Tao][]
191 - *Nix* by [Domen Kožar][]
192 - *x86asm* by [innocenat][]
193 - *Cap’n Proto* and *Thrift* by [Oleg Efimov][]
194 - *Monkey* by [Arthur Bikmullin][]
195 - *TypeScript* by [Panu Horsmalahti][]
196 - *Nimrod* by [Flaviu Tamas][]
197 - *Gradle* by [Damian Mee][]
198 - *Haxe* by [Christopher Kaster][]
199 - *Swift* by [Chris Eidhof][] and [Nate Cook][]
200
201 New styles:
202
203 - *Kimbie*, light and dark variants by [Jan T. Sott][]
204 - *Color brewer* by [Fabrício Tavares de Oliveira][]
205 - *Codepen.io embed* by [Justin Perry][]
206 - *Hybrid* by [Nic West][]
207
208 [Sam Pikesley]: https://github.com/pikesley
209 [Sindre Sorhus]: https://github.com/sindresorhus
210 [Josh Adams]: https://github.com/knewter
211 [Jan T. Sott]: https://github.com/idleberg
212 [Jun Yang]: https://github.com/harttle
213 [Dan Tao]: https://github.com/dtao
214 [Domen Kožar]: https://github.com/iElectric
215 [innocenat]: https://github.com/innocenat
216 [Oleg Efimov]: https://github.com/Sannis
217 [Arthur Bikmullin]: https://github.com/devolonter
218 [Panu Horsmalahti]: https://github.com/panuhorsmalahti
219 [Flaviu Tamas]: https://github.com/flaviut
220 [Damian Mee]: https://github.com/chester1000
221 [Christopher Kaster]: http://christopher.kaster.ws
222 [Fabrício Tavares de Oliveira]: https://github.com/fabriciotav
223 [Justin Perry]: https://github.com/ourmaninamsterdam
224 [Nic West]: https://github.com/nicwest
225 [Chris Eidhof]: https://github.com/chriseidhof
226 [Nate Cook]: https://github.com/natecook1000
227
228 Other improvements:
229
230 - The README is heavily reworked and brought up to date by [Jeremy Hull][].
231 - Added [`listLanguages()`][ll] method in the API.
232 - Improved C/C++/C# detection.
233 - Added a bunch of new language aliases, documented the existing ones. Thanks to
234 [Sindre Sorhus][] for background research.
235 - Added phrasal English words to boost relevance in comments.
236 - Many improvements to SQL definition made by [Heiko August][],
237 [Nikolay Lisienko][] and [Travis Odom][].
238 - The shorter `lang-` prefix for language names in HTML classes supported
239 alongside `language-`. Thanks to [Jeff Escalante][].
240 - Ruby's got support for interactive console sessions. Thanks to
241 [Pascal Hurni][].
242 - Added built-in functions for R language. Thanks to [Artem A. Klevtsov][].
243 - Rust's got definition for lifetime parameters and improved string syntax.
244 Thanks to [Roman Shmatov][].
245 - Various improvements to Objective-C definition by [Matt Diephouse][].
246 - Fixed highlighting of generics in Java.
247
248 [ll]: http://highlightjs.readthedocs.org/en/latest/api.html#listlanguages
249 [Sindre Sorhus]: https://github.com/sindresorhus
250 [Heiko August]: https://github.com/auge8472
251 [Nikolay Lisienko]: https://github.com/neor-ru
252 [Travis Odom]: https://github.com/Burstaholic
253 [Jeff Escalante]: https://github.com/jenius
254 [Pascal Hurni]: https://github.com/phurni
255 [Jiyin Yiyong]: https://github.com/jiyinyiyong
256 [Artem A. Klevtsov]: https://github.com/unikum
257 [Roman Shmatov]: https://github.com/shmatov
258 [Jeremy Hull]: https://github.com/sourrust
259 [Matt Diephouse]: https://github.com/mdiep
260
261
262 ## Version 8.0
263
264 This new major release is quite a big overhaul bringing both new features and
265 some backwards incompatible changes. However, chances are that the majority of
266 users won't be affected by the latter: the basic scenario described in the
267 README is left intact.
268
269 Here's what did change in an incompatible way:
270
271 - We're now prefixing all classes located in [CSS classes reference][cr] with
272 `hljs-`, by default, because some class names would collide with other
273 people's stylesheets. If you were using an older version, you might still want
274 the previous behavior, but still want to upgrade. To suppress this new
275 behavior, you would initialize like so:
276
277 ```html
278 <script type="text/javascript">
279 hljs.configure({classPrefix: ''});
280 hljs.initHighlightingOnLoad();
281 </script>
282 ```
283
284 - `tabReplace` and `useBR` that were used in different places are also unified
285 into the global options object and are to be set using `configure(options)`.
286 This function is documented in our [API docs][]. Also note that these
287 parameters are gone from `highlightBlock` and `fixMarkup` which are now also
288 rely on `configure`.
289
290 - We removed public-facing (though undocumented) object `hljs.LANGUAGES` which
291 was used to register languages with the library in favor of two new methods:
292 `registerLanguage` and `getLanguage`. Both are documented in our [API docs][].
293
294 - Result returned from `highlight` and `highlightAuto` no longer contains two
295 separate attributes contributing to relevance score, `relevance` and
296 `keyword_count`. They are now unified in `relevance`.
297
298 Another technically compatible change that nonetheless might need attention:
299
300 - The structure of the NPM package was refactored, so if you had installed it
301 locally, you'll have to update your paths. The usual `require('highlight.js')`
302 works as before. This is contributed by [Dmitry Smolin][].
303
304 New features:
305
306 - Languages now can be recognized by multiple names like "js" for JavaScript or
307 "html" for, well, HTML (which earlier insisted on calling it "xml"). These
308 aliases can be specified in the class attribute of the code container in your
309 HTML as well as in various API calls. For now there are only a few very common
310 aliases but we'll expand it in the future. All of them are listed in the
311 [class reference][cr].
312
313 - Language detection can now be restricted to a subset of languages relevant in
314 a given context — a web page or even a single highlighting call. This is
315 especially useful for node.js build that includes all the known languages.
316 Another example is a StackOverflow-style site where users specify languages
317 as tags rather than in the markdown-formatted code snippets. This is
318 documented in the [API reference][] (see methods `highlightAuto` and
319 `configure`).
320
321 - Language definition syntax streamlined with [variants][] and
322 [beginKeywords][].
323
324 New languages and styles:
325
326 - *Oxygene* by [Carlo Kok][]
327 - *Mathematica* by [Daniel Kvasnička][]
328 - *Autohotkey* by [Seongwon Lee][]
329 - *Atelier* family of styles in 10 variants by [Bram de Haan][]
330 - *Paraíso* styles by [Jan T. Sott][]
331
332 Miscellaneous improvements:
333
334 - Highlighting `=>` prompts in Clojure.
335 - [Jeremy Hull][] fixed a lot of styles for consistency.
336 - Finally, highlighting PHP and HTML [mixed in peculiar ways][php-html].
337 - Objective C and C# now properly highlight titles in method definition.
338 - Big overhaul of relevance counting for a number of languages. Please do report
339 bugs about mis-detection of non-trivial code snippets!
340
341 [API reference]: http://highlightjs.readthedocs.org/en/latest/api.html
342
343 [cr]: http://highlightjs.readthedocs.org/en/latest/css-classes-reference.html
344 [api docs]: http://highlightjs.readthedocs.org/en/latest/api.html
345 [variants]: https://groups.google.com/d/topic/highlightjs/VoGC9-1p5vk/discussion
346 [beginKeywords]: https://github.com/isagalaev/highlight.js/commit/6c7fdea002eb3949577a85b3f7930137c7c3038d
347 [php-html]: https://twitter.com/highlightjs/status/408890903017689088
348
349 [Carlo Kok]: https://github.com/carlokok
350 [Bram de Haan]: https://github.com/atelierbram
351 [Daniel Kvasnička]: https://github.com/dkvasnicka
352 [Dmitry Smolin]: https://github.com/dimsmol
353 [Jeremy Hull]: https://github.com/sourrust
354 [Seongwon Lee]: https://github.com/dlimpid
355 [Jan T. Sott]: https://github.com/idleberg
356
357
358 ## Version 7.5
359
360 A catch-up release dealing with some of the accumulated contributions. This one
361 is probably will be the last before the 8.0 which will be slightly backwards
362 incompatible regarding some advanced use-cases.
363
364 One outstanding change in this version is the addition of 6 languages to the
365 [hosted script][d]: Markdown, ObjectiveC, CoffeeScript, Apache, Nginx and
366 Makefile. It now weighs about 6K more but we're going to keep it under 30K.
367
368 New languages:
369
370 - OCaml by [Mehdi Dogguy][mehdid] and [Nicolas Braud-Santoni][nbraud]
371 - [LiveCode Server][lcs] by [Ralf Bitter][revig]
372 - Scilab by [Sylvestre Ledru][sylvestre]
373 - basic support for Makefile by [Ivan Sagalaev][isagalaev]
374
375 Improvements:
376
377 - Ruby's got support for characters like `?A`, `?1`, `?\012` etc. and `%r{..}`
378 regexps.
379 - Clojure now allows a function call in the beginning of s-expressions
380 `(($filter "myCount") (arr 1 2 3 4 5))`.
381 - Haskell's got new keywords and now recognizes more things like pragmas,
382 preprocessors, modules, containers, FFIs etc. Thanks to [Zena Treep][treep]
383 for the implementation and to [Jeremy Hull][sourrust] for guiding it.
384 - Miscellaneous fixes in PHP, Brainfuck, SCSS, Asciidoc, CMake, Python and F#.
385
386 [mehdid]: https://github.com/mehdid
387 [nbraud]: https://github.com/nbraud
388 [revig]: https://github.com/revig
389 [lcs]: http://livecode.com/developers/guides/server/
390 [sylvestre]: https://github.com/sylvestre
391 [isagalaev]: https://github.com/isagalaev
392 [treep]: https://github.com/treep
393 [sourrust]: https://github.com/sourrust
394 [d]: http://highlightjs.org/download/
395
396
397 ## New core developers
398
399 The latest long period of almost complete inactivity in the project coincided
400 with growing interest to it led to a decision that now seems completely obvious:
401 we need more core developers.
402
403 So without further ado let me welcome to the core team two long-time
404 contributors: [Jeremy Hull][] and [Oleg
405 Efimov][].
406
407 Hope now we'll be able to work through stuff faster!
408
409 P.S. The historical commit is [here][1] for the record.
410
411 [Jeremy Hull]: https://github.com/sourrust
412 [Oleg Efimov]: https://github.com/sannis
413 [1]: https://github.com/isagalaev/highlight.js/commit/f3056941bda56d2b72276b97bc0dd5f230f2473f
414
415
416 ## Version 7.4
417
418 This long overdue version is a snapshot of the current source tree with all the
419 changes that happened during the past year. Sorry for taking so long!
420
421 Along with the changes in code highlight.js has finally got its new home at
422 <http://highlightjs.org/>, moving from its cradle on Software Maniacs which it
423 outgrew a long time ago. Be sure to report any bugs about the site to
424 <mailto:info@highlightjs.org>.
425
426 On to what's new…
427
428 New languages:
429
430 - Handlebars templates by [Robin Ward][]
431 - Oracle Rules Language by [Jason Jacobson][]
432 - F# by [Joans Follesø][]
433 - AsciiDoc and Haml by [Dan Allen][]
434 - Lasso by [Eric Knibbe][]
435 - SCSS by [Kurt Emch][]
436 - VB.NET by [Poren Chiang][]
437 - Mizar by [Kelley van Evert][]
438
439 [Robin Ward]: https://github.com/eviltrout
440 [Jason Jacobson]: https://github.com/jayce7
441 [Joans Follesø]: https://github.com/follesoe
442 [Dan Allen]: https://github.com/mojavelinux
443 [Eric Knibbe]: https://github.com/EricFromCanada
444 [Kurt Emch]: https://github.com/kemch
445 [Poren Chiang]: https://github.com/rschiang
446 [Kelley van Evert]: https://github.com/kelleyvanevert
447
448 New style themes:
449
450 - Monokai Sublime by [noformnocontent][]
451 - Railscasts by [Damien White][]
452 - Obsidian by [Alexander Marenin][]
453 - Docco by [Simon Madine][]
454 - Mono Blue by [Ivan Sagalaev][] (uses a single color hue for everything)
455 - Foundation by [Dan Allen][]
456
457 [noformnocontent]: http://nn.mit-license.org/
458 [Damien White]: https://github.com/visoft
459 [Alexander Marenin]: https://github.com/ioncreature
460 [Simon Madine]: https://github.com/thingsinjars
461 [Ivan Sagalaev]: https://github.com/isagalaev
462
463 Other notable changes:
464
465 - Corrected many corner cases in CSS.
466 - Dropped Python 2 version of the build tool.
467 - Implemented building for the AMD format.
468 - Updated Rust keywords (thanks to [Dmitry Medvinsky][]).
469 - Literal regexes can now be used in language definitions.
470 - CoffeeScript highlighting is now significantly more robust and rich due to
471 input from [Cédric Néhémie][].
472
473 [Dmitry Medvinsky]: https://github.com/dmedvinsky
474 [Cédric Néhémie]: https://github.com/abe33
475
476
477 ## Version 7.3
478
479 - Since this version highlight.js no longer works in IE version 8 and older.
480 It's made it possible to reduce the library size and dramatically improve code
481 readability and made it easier to maintain. Time to go forward!
482
483 - New languages: AppleScript (by [Nathan Grigg][ng] and [Dr. Drang][dd]) and
484 Brainfuck (by [Evgeny Stepanischev][bolk]).
485
486 - Improvements to existing languages:
487
488 - interpreter prompt in Python (`>>>` and `...`)
489 - @-properties and classes in CoffeeScript
490 - E4X in JavaScript (by [Oleg Efimov][oe])
491 - new keywords in Perl (by [Kirk Kimmel][kk])
492 - big Ruby syntax update (by [Vasily Polovnyov][vast])
493 - small fixes in Bash
494
495 - Also Oleg Efimov did a great job of moving all the docs for language and style
496 developers and contributors from the old wiki under the source code in the
497 "docs" directory. Now these docs are nicely presented at
498 <http://highlightjs.readthedocs.org/>.
499
500 [ng]: https://github.com/nathan11g
501 [dd]: https://github.com/drdrang
502 [bolk]: https://github.com/bolknote
503 [oe]: https://github.com/Sannis
504 [kk]: https://github.com/kimmel
505 [vast]: https://github.com/vast
506
507
508 ## Version 7.2
509
510 A regular bug-fix release without any significant new features. Enjoy!
511
512
513 ## Version 7.1
514
515 A Summer crop:
516
517 - [Marc Fornos][mf] made the definition for Clojure along with the matching
518 style Rainbow (which, of course, works for other languages too).
519 - CoffeeScript support continues to improve getting support for regular
520 expressions.
521 - Yoshihide Jimbo ported to highlight.js [five Tomorrow styles][tm] from the
522 [project by Chris Kempson][tm0].
523 - Thanks to [Casey Duncun][cd] the library can now be built in the popular
524 [AMD format][amd].
525 - And last but not least, we've got a fair number of correctness and consistency
526 fixes, including a pretty significant refactoring of Ruby.
527
528 [mf]: https://github.com/mfornos
529 [tm]: http://jmblog.github.com/color-themes-for-highlightjs/
530 [tm0]: https://github.com/ChrisKempson/Tomorrow-Theme
531 [cd]: https://github.com/caseman
532 [amd]: http://requirejs.org/docs/whyamd.html
533
534
535 ## Version 7.0
536
537 The reason for the new major version update is a global change of keyword syntax
538 which resulted in the library getting smaller once again. For example, the
539 hosted build is 2K less than at the previous version while supporting two new
540 languages.
541
542 Notable changes:
543
544 - The library now works not only in a browser but also with [node.js][]. It is
545 installable with `npm install highlight.js`. [API][] docs are available on our
546 wiki.
547
548 - The new unique feature (apparently) among syntax highlighters is highlighting
549 *HTTP* headers and an arbitrary language in the request body. The most useful
550 languages here are *XML* and *JSON* both of which highlight.js does support.
551 Here's [the detailed post][p] about the feature.
552
553 - Two new style themes: a dark "south" *[Pojoaque][]* by Jason Tate and an
554 emulation of*XCode* IDE by [Angel Olloqui][ao].
555
556 - Three new languages: *D* by [Aleksandar Ružičić][ar], *R* by [Joe Cheng][jc]
557 and *GLSL* by [Sergey Tikhomirov][st].
558
559 - *Nginx* syntax has become a million times smaller and more universal thanks to
560 remaking it in a more generic manner that doesn't require listing all the
561 directives in the known universe.
562
563 - Function titles are now highlighted in *PHP*.
564
565 - *Haskell* and *VHDL* were significantly reworked to be more rich and correct
566 by their respective maintainers [Jeremy Hull][sr] and [Igor Kalnitsky][ik].
567
568 And last but not least, many bugs have been fixed around correctness and
569 language detection.
570
571 Overall highlight.js currently supports 51 languages and 20 style themes.
572
573 [node.js]: http://nodejs.org/
574 [api]: http://softwaremaniacs.org/wiki/doku.php/highlight.js:api
575 [p]: http://softwaremaniacs.org/blog/2012/05/10/http-and-json-in-highlight-js/en/
576 [pojoaque]: http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html
577 [ao]: https://github.com/angelolloqui
578 [ar]: https://github.com/raleksandar
579 [jc]: https://github.com/jcheng5
580 [st]: https://github.com/tikhomirov
581 [sr]: https://github.com/sourrust
582 [ik]: https://github.com/ikalnitsky
583
584
585 ## Version 6.2
586
587 A lot of things happened in highlight.js since the last version! We've got nine
588 new contributors, the discussion group came alive, and the main branch on GitHub
589 now counts more than 350 followers. Here are most significant results coming
590 from all this activity:
591
592 - 5 (five!) new languages: Rust, ActionScript, CoffeeScript, MatLab and
593 experimental support for markdown. Thanks go to [Andrey Vlasovskikh][av],
594 [Alexander Myadzel][am], [Dmytrii Nagirniak][dn], [Oleg Efimov][oe], [Denis
595 Bardadym][db] and [John Crepezzi][jc].
596
597 - 2 new style themes: Monokai by [Luigi Maselli][lm] and stylistic imitation of
598 another well-known highlighter Google Code Prettify by [Aahan Krish][ak].
599
600 - A vast number of [correctness fixes and code refactorings][log], mostly made
601 by [Oleg Efimov][oe] and [Evgeny Stepanischev][es].
602
603 [av]: https://github.com/vlasovskikh
604 [am]: https://github.com/myadzel
605 [dn]: https://github.com/dnagir
606 [oe]: https://github.com/Sannis
607 [db]: https://github.com/btd
608 [jc]: https://github.com/seejohnrun
609 [lm]: http://grigio.org/
610 [ak]: https://github.com/geekpanth3r
611 [es]: https://github.com/bolknote
612 [log]: https://github.com/isagalaev/highlight.js/commits/
613
614
615 ## Version 6.1 — Solarized
616
617 [Jeremy Hull][jh] has implemented my dream feature — a port of [Solarized][]
618 style theme famous for being based on the intricate color theory to achieve
619 correct contrast and color perception. It is now available for highlight.js in
620 both variants — light and dark.
621
622 This version also adds a new original style Arta. Its author pumbur maintains a
623 [heavily modified fork of highlight.js][pb] on GitHub.
624
625 [jh]: https://github.com/sourrust
626 [solarized]: http://ethanschoonover.com/solarized
627 [pb]: https://github.com/pumbur/highlight.js
628
629
630 ## Version 6.0
631
632 New major version of the highlighter has been built on a significantly
633 refactored syntax. Due to this it's even smaller than the previous one while
634 supporting more languages!
635
636 New languages are:
637
638 - Haskell by [Jeremy Hull][sourrust]
639 - Erlang in two varieties — module and REPL — made collectively by [Nikolay
640 Zakharov][desh], [Dmitry Kovega][arhibot] and [Sergey Ignatov][ignatov]
641 - Objective C by [Valerii Hiora][vhbit]
642 - Vala by [Antono Vasiljev][antono]
643 - Go by [Stephan Kountso][steplg]
644
645 [sourrust]: https://github.com/sourrust
646 [desh]: http://desh.su/
647 [arhibot]: https://github.com/arhibot
648 [ignatov]: https://github.com/ignatov
649 [vhbit]: https://github.com/vhbit
650 [antono]: https://github.com/antono
651 [steplg]: https://github.com/steplg
652
653 Also this version is marginally faster and fixes a number of small long-standing
654 bugs.
655
656 Developer overview of the new language syntax is available in a [blog post about
657 recent beta release][beta].
658
659 [beta]: http://softwaremaniacs.org/blog/2011/04/25/highlight-js-60-beta/en/
660
661 P.S. New version is not yet available on a Yandex CDN, so for now you have to
662 download [your own copy][d].
663
664 [d]: /soft/highlight/en/download/
665
666
667 ## Version 5.14
668
669 Fixed bugs in HTML/XML detection and relevance introduced in previous
670 refactoring.
671
672 Also test.html now shows the second best result of language detection by
673 relevance.
674
675
676 ## Version 5.13
677
678 Past weekend began with a couple of simple additions for existing languages but
679 ended up in a big code refactoring bringing along nice improvements for language
680 developers.
681
682 ### For users
683
684 - Description of C++ has got new keywords from the upcoming [C++ 0x][] standard.
685 - Description of HTML has got new tags from [HTML 5][].
686 - CSS-styles have been unified to use consistent padding and also have lost
687 pop-outs with names of detected languages.
688 - [Igor Kalnitsky][ik] has sent two new language descriptions: CMake & VHDL.
689
690 This makes total number of languages supported by highlight.js to reach 35.
691
692 Bug fixes:
693
694 - Custom classes on `<pre>` tags are not being overridden anymore
695 - More correct highlighting of code blocks inside non-`<pre>` containers:
696 highlighter now doesn't insist on replacing them with its own container and
697 just replaces the contents.
698 - Small fixes in browser compatibility and heuristics.
699
700 [c++ 0x]: http://ru.wikipedia.org/wiki/C%2B%2B0x
701 [html 5]: http://en.wikipedia.org/wiki/HTML5
702 [ik]: http://kalnitsky.org.ua/
703
704 ### For developers
705
706 The most significant change is the ability to include language submodes right
707 under `contains` instead of defining explicit named submodes in the main array:
708
709 contains: [
710 'string',
711 'number',
712 {begin: '\\n', end: hljs.IMMEDIATE_RE}
713 ]
714
715 This is useful for auxiliary modes needed only in one place to define parsing.
716 Note that such modes often don't have `className` and hence won't generate a
717 separate `<span>` in the resulting markup. This is similar in effect to
718 `noMarkup: true`. All existing languages have been refactored accordingly.
719
720 Test file test.html has at last become a real test. Now it not only puts the
721 detected language name under the code snippet but also tests if it matches the
722 expected one. Test summary is displayed right above all language snippets.
723
724
725 ## CDN
726
727 Fine people at [Yandex][] agreed to host highlight.js on their big fast servers.
728 [Link up][l]!
729
730 [yandex]: http://yandex.com/
731 [l]: http://softwaremaniacs.org/soft/highlight/en/download/
732
733
734 ## Version 5.10 — "Paris".
735
736 Though I'm on a vacation in Paris, I decided to release a new version with a
737 couple of small fixes:
738
739 - Tomas Vitvar discovered that TAB replacement doesn't always work when used
740 with custom markup in code
741 - SQL parsing is even more rigid now and doesn't step over SmallTalk in tests
742
743
744 ## Version 5.9
745
746 A long-awaited version is finally released.
747
748 New languages:
749
750 - Andrew Fedorov made a definition for Lua
751 - a long-time highlight.js contributor [Peter Leonov][pl] made a definition for
752 Nginx config
753 - [Vladimir Moskva][vm] made a definition for TeX
754
755 [pl]: http://kung-fu-tzu.ru/
756 [vm]: http://fulc.ru/
757
758 Fixes for existing languages:
759
760 - [Loren Segal][ls] reworked the Ruby definition and added highlighting for
761 [YARD][] inline documentation
762 - the definition of SQL has become more solid and now it shouldn't be overly
763 greedy when it comes to language detection
764
765 [ls]: http://gnuu.org/
766 [yard]: http://yardoc.org/
767
768 The highlighter has become more usable as a library allowing to do highlighting
769 from initialization code of JS frameworks and in ajax methods (see.
770 readme.eng.txt).
771
772 Also this version drops support for the [WordPress][wp] plugin. Everyone is
773 welcome to [pick up its maintenance][p] if needed.
774
775 [wp]: http://wordpress.org/
776 [p]: http://bazaar.launchpad.net/~isagalaev/+junk/highlight/annotate/342/src/wp_highlight.js.php
777
778
779 ## Version 5.8
780
781 - Jan Berkel has contributed a definition for Scala. +1 to hotness!
782 - All CSS-styles are rewritten to work only inside `<pre>` tags to avoid
783 conflicts with host site styles.
784
785
786 ## Version 5.7.
787
788 Fixed escaping of quotes in VBScript strings.
789
790
791 ## Version 5.5
792
793 This version brings a small change: now .ini-files allow digits, underscores and
794 square brackets in key names.
795
796
797 ## Version 5.4
798
799 Fixed small but upsetting bug in the packer which caused incorrect highlighting
800 of explicitly specified languages. Thanks to Andrew Fedorov for precise
801 diagnostics!
802
803
804 ## Version 5.3
805
806 The version to fulfil old promises.
807
808 The most significant change is that highlight.js now preserves custom user
809 markup in code along with its own highlighting markup. This means that now it's
810 possible to use, say, links in code. Thanks to [Vladimir Dolzhenko][vd] for the
811 [initial proposal][1] and for making a proof-of-concept patch.
812
813 Also in this version:
814
815 - [Vasily Polovnyov][vp] has sent a GitHub-like style and has implemented
816 support for CSS @-rules and Ruby symbols.
817 - Yura Zaripov has sent two styles: Brown Paper and School Book.
818 - Oleg Volchkov has sent a definition for [Parser 3][p3].
819
820 [1]: http://softwaremaniacs.org/forum/highlightjs/6612/
821 [p3]: http://www.parser.ru/
822 [vp]: http://vasily.polovnyov.ru/
823 [vd]: http://dolzhenko.blogspot.com/
824
825
826 ## Version 5.2
827
828 - at last it's possible to replace indentation TABs with something sensible
829 (e.g. 2 or 4 spaces)
830 - new keywords and built-ins for 1C by Sergey Baranov
831 - a couple of small fixes to Apache highlighting
832
833
834 ## Version 5.1
835
836 This is one of those nice version consisting entirely of new and shiny
837 contributions!
838
839 - [Vladimir Ermakov][vooon] created highlighting for AVR Assembler
840 - [Ruslan Keba][rukeba] created highlighting for Apache config file. Also his
841 original visual style for it is now available for all highlight.js languages
842 under the name "Magula".
843 - [Shuen-Huei Guan][drake] (aka Drake) sent new keywords for RenderMan
844 languages. Also thanks go to [Konstantin Evdokimenko][ke] for his advice on
845 the matter.
846
847 [vooon]: http://vehq.ru/about/
848 [rukeba]: http://rukeba.com/
849 [drake]: http://drakeguan.org/
850 [ke]: http://k-evdokimenko.moikrug.ru/
851
852
853 ## Version 5.0
854
855 The main change in the new major version of highlight.js is a mechanism for
856 packing several languages along with the library itself into a single compressed
857 file. Now sites using several languages will load considerably faster because
858 the library won't dynamically include additional files while loading.
859
860 Also this version fixes a long-standing bug with Javascript highlighting that
861 couldn't distinguish between regular expressions and division operations.
862
863 And as usually there were a couple of minor correctness fixes.
864
865 Great thanks to all contributors! Keep using highlight.js.
866
867
868 ## Version 4.3
869
870 This version comes with two contributions from [Jason Diamond][jd]:
871
872 - language definition for C# (yes! it was a long-missed thing!)
873 - Visual Studio-like highlighting style
874
875 Plus there are a couple of minor bug fixes for parsing HTML and XML attributes.
876
877 [jd]: http://jason.diamond.name/weblog/
878
879
880 ## Version 4.2
881
882 The biggest news is highlighting for Lisp, courtesy of Vasily Polovnyov. It's
883 somewhat experimental meaning that for highlighting "keywords" it doesn't use
884 any pre-defined set of a Lisp dialect. Instead it tries to highlight first word
885 in parentheses wherever it makes sense. I'd like to ask people programming in
886 Lisp to confirm if it's a good idea and send feedback to [the forum][f].
887
888 Other changes:
889
890 - Smalltalk was excluded from DEFAULT_LANGUAGES to save traffic
891 - [Vladimir Epifanov][voldmar] has implemented javascript style switcher for
892 test.html
893 - comments now allowed inside Ruby function definition
894 - [MEL][] language from [Shuen-Huei Guan][drake]
895 - whitespace now allowed between `<pre>` and `<code>`
896 - better auto-detection of C++ and PHP
897 - HTML allows embedded VBScript (`<% .. %>`)
898
899 [f]: http://softwaremaniacs.org/forum/highlightjs/
900 [voldmar]: http://voldmar.ya.ru/
901 [mel]: http://en.wikipedia.org/wiki/Maya_Embedded_Language
902 [drake]: http://drakeguan.org/
903
904
905 ## Version 4.1
906
907 Languages:
908
909 - Bash from Vah
910 - DOS bat-files from Alexander Makarov (Sam)
911 - Diff files from Vasily Polovnyov
912 - Ini files from myself though initial idea was from Sam
913
914 Styles:
915
916 - Zenburn from Vladimir Epifanov, this is an imitation of a
917 [well-known theme for Vim][zenburn].
918 - Ascetic from myself, as a realization of ideals of non-flashy highlighting:
919 just one color in only three gradations :-)
920
921 In other news. [One small bug][bug] was fixed, built-in keywords were added for
922 Python and C++ which improved auto-detection for the latter (it was shame that
923 [my wife's blog][alenacpp] had issues with it from time to time). And lastly
924 thanks go to Sam for getting rid of my stylistic comments in code that were
925 getting in the way of [JSMin][].
926
927 [zenburn]: http://en.wikipedia.org/wiki/Zenburn
928 [alenacpp]: http://alenacpp.blogspot.com/
929 [bug]: http://softwaremaniacs.org/forum/viewtopic.php?id=1823
930 [jsmin]: http://code.google.com/p/jsmin-php/
931
932
933 ## Version 4.0
934
935 New major version is a result of vast refactoring and of many contributions.
936
937 Visible new features:
938
939 - Highlighting of embedded languages. Currently is implemented highlighting of
940 Javascript and CSS inside HTML.
941 - Bundled 5 ready-made style themes!
942
943 Invisible new features:
944
945 - Highlight.js no longer pollutes global namespace. Only one object and one
946 function for backward compatibility.
947 - Performance is further increased by about 15%.
948
949 Changing of a major version number caused by a new format of language definition
950 files. If you use some third-party language files they should be updated.
951
952
953 ## Version 3.5
954
955 A very nice version in my opinion fixing a number of small bugs and slightly
956 increased speed in a couple of corner cases. Thanks to everybody who reports
957 bugs in he [forum][f] and by email!
958
959 There is also a new language — XML. A custom XML formerly was detected as HTML
960 and didn't highlight custom tags. In this version I tried to make custom XML to
961 be detected and highlighted by its own rules. Which by the way include such
962 things as CDATA sections and processing instructions (`<? ... ?>`).
963
964 [f]: http://softwaremaniacs.org/forum/viewforum.php?id=6
965
966
967 ## Version 3.3
968
969 [Vladimir Gubarkov][xonix] has provided an interesting and useful addition.
970 File export.html contains a little program that shows and allows to copy and
971 paste an HTML code generated by the highlighter for any code snippet. This can
972 be useful in situations when one can't use the script itself on a site.
973
974
975 [xonix]: http://xonixx.blogspot.com/
976
977
978 ## Version 3.2 consists completely of contributions:
979
980 - Vladimir Gubarkov has described SmallTalk
981 - Yuri Ivanov has described 1C
982 - Peter Leonov has packaged the highlighter as a Firefox extension
983 - Vladimir Ermakov has compiled a mod for phpBB
984
985 Many thanks to you all!
986
987
988 ## Version 3.1
989
990 Three new languages are available: Django templates, SQL and Axapta. The latter
991 two are sent by [Dmitri Roudakov][1]. However I've almost entirely rewrote an
992 SQL definition but I'd never started it be it from the ground up :-)
993
994 The engine itself has got a long awaited feature of grouping keywords
995 ("keyword", "built-in function", "literal"). No more hacks!
996
997 [1]: http://roudakov.ru/
998
999
1000 ## Version 3.0
1001
1002 It is major mainly because now highlight.js has grown large and has become
1003 modular. Now when you pass it a list of languages to highlight it will
1004 dynamically load into a browser only those languages.
1005
1006 Also:
1007
1008 - Konstantin Evdokimenko of [RibKit][] project has created a highlighting for
1009 RenderMan Shading Language and RenderMan Interface Bytestream. Yay for more
1010 languages!
1011 - Heuristics for C++ and HTML got better.
1012 - I've implemented (at last) a correct handling of backslash escapes in C-like
1013 languages.
1014
1015 There is also a small backwards incompatible change in the new version. The
1016 function initHighlighting that was used to initialize highlighting instead of
1017 initHighlightingOnLoad a long time ago no longer works. If you by chance still
1018 use it — replace it with the new one.
1019
1020 [RibKit]: http://ribkit.sourceforge.net/
1021
1022
1023 ## Version 2.9
1024
1025 Highlight.js is a parser, not just a couple of regular expressions. That said
1026 I'm glad to announce that in the new version 2.9 has support for:
1027
1028 - in-string substitutions for Ruby -- `#{...}`
1029 - strings from from numeric symbol codes (like #XX) for Delphi
1030
1031
1032 ## Version 2.8
1033
1034 A maintenance release with more tuned heuristics. Fully backwards compatible.
1035
1036
1037 ## Version 2.7
1038
1039 - Nikita Ledyaev presents highlighting for VBScript, yay!
1040 - A couple of bugs with escaping in strings were fixed thanks to Mickle
1041 - Ongoing tuning of heuristics
1042
1043 Fixed bugs were rather unpleasant so I encourage everyone to upgrade!
1044
1045
1046 ## Version 2.4
1047
1048 - Peter Leonov provides another improved highlighting for Perl
1049 - Javascript gets a new kind of keywords — "literals". These are the words
1050 "true", "false" and "null"
1051
1052 Also highlight.js homepage now lists sites that use the library. Feel free to
1053 add your site by [dropping me a message][mail] until I find the time to build a
1054 submit form.
1055
1056 [mail]: mailto:Maniac@SoftwareManiacs.Org
1057
1058
1059 ## Version 2.3
1060
1061 This version fixes IE breakage in previous version. My apologies to all who have
1062 already downloaded that one!
1063
1064
1065 ## Version 2.2
1066
1067 - added highlighting for Javascript
1068 - at last fixed parsing of Delphi's escaped apostrophes in strings
1069 - in Ruby fixed highlighting of keywords 'def' and 'class', same for 'sub' in
1070 Perl
1071
1072
1073 ## Version 2.0
1074
1075 - Ruby support by [Anton Kovalyov][ak]
1076 - speed increased by orders of magnitude due to new way of parsing
1077 - this same way allows now correct highlighting of keywords in some tricky
1078 places (like keyword "End" at the end of Delphi classes)
1079
1080 [ak]: http://anton.kovalyov.net/
1081
1082
1083 ## Version 1.0
1084
1085 Version 1.0 of javascript syntax highlighter is released!
1086
1087 It's the first version available with English description. Feel free to post
1088 your comments and question to [highlight.js forum][forum]. And don't be afraid
1089 if you find there some fancy Cyrillic letters -- it's for Russian users too :-)
1090
1091 [forum]: http://softwaremaniacs.org/forum/viewforum.php?id=6