3 This new major release is quite a big overhaul bringing both new features and
\r
4 some backwards incompatible changes. However, chances are that the majority of
\r
5 users won't be affected by the latter: the basic scenario described in the
\r
6 README is left intact.
\r
8 Here's what did change in an incompatible way:
\r
10 - We're now prefixing all classes located in [CSS classes reference][cr] with
\r
11 `hljs-`, by default, because some class names would collide with other
\r
12 people's stylesheets. If you were using an older version, you might still want
\r
13 the previous behavior, but still want to upgrade. To suppress this new
\r
14 behavior, you would initialize like so:
\r
17 <script type="text/javascript">
\r
18 hljs.configure({classPrefix: ''});
\r
19 hljs.initHighlightingOnLoad();
\r
23 - `tabReplace` and `useBR` that were used in different places are also unified
\r
24 into the global options object and are to be set using `configure(options)`.
\r
25 This function is documented in our [API docs][]. Also note that these
\r
26 parameters are gone from `highlightBlock` and `fixMarkup` which are now also
\r
27 rely on `configure`.
\r
29 - We removed public-facing (though undocumented) object `hljs.LANGUAGES` which
\r
30 was used to register languages with the library in favor of two new methods:
\r
31 `registerLanguage` and `getLanguage`. Both are documented in our [API docs][].
\r
33 - Result returned from `highlight` and `highlightAuto` no longer contains two
\r
34 separate attributes contributing to relevance score, `relevance` and
\r
35 `keyword_count`. They are now unified in `relevance`.
\r
37 Another technically compatible change that nonetheless might need attention:
\r
39 - The structure of the NPM package was refactored, so if you had installed it
\r
40 locally, you'll have to update your paths. The usual `require('highlight.js')`
\r
41 works as before. This is contributed by [Dmitry Smolin][].
\r
45 - Languages now can be recognized by multiple names like "js" for JavaScript or
\r
46 "html" for, well, HTML (which earlier insisted on calling it "xml"). These
\r
47 aliases can be specified in the class attribute of the code container in your
\r
48 HTML as well as in various API calls. For now there are only a few very common
\r
49 aliases but we'll expand it in the future. All of them are listed in the
\r
50 [class reference][].
\r
52 - Language detection can now be restricted to a subset of languages relevant in
\r
53 a given context — a web page or even a single highlighting call. This is
\r
54 especially useful for node.js build that includes all the known languages.
\r
55 Another example is a StackOverflow-style site where users specify languages
\r
56 as tags rather than in the markdown-formatted code snippets. This is
\r
57 documented in the [API reference][] (see methods `highlightAuto` and
\r
60 - Language definition syntax streamlined with [variants][] and
\r
63 New languages and styles:
\r
65 - *Oxygene* by [Carlo Kok][]
\r
66 - *Mathematica* by [Daniel Kvasnička][]
\r
67 - *Autohotkey* by [Seongwon Lee][]
\r
68 - *Atelier* family of styles in 10 variants by [Bram de Haan][]
\r
69 - *Paraíso* styles by [Jan T. Sott][]
\r
71 Miscelleanous improvements:
\r
73 - Highlighting `=>` prompts in Clojure.
\r
74 - [Jeremy Hull][] fixed a lot of styles for consistency.
\r
75 - Finally, highlighting PHP and HTML [mixed in peculiar ways][php-html].
\r
76 - Objective C and C# now properly highlight titles in method definition.
\r
77 - Big overhaul of relevance counting for a number of languages. Please do report
\r
78 bugs about mis-detection of non-trivial code snippets!
\r
80 [cr]: http://highlightjs.readthedocs.org/en/latest/css-classes-reference.html
\r
81 [api docs]: http://highlightjs.readthedocs.org/en/latest/api.html
\r
82 [variants]: https://groups.google.com/d/topic/highlightjs/VoGC9-1p5vk/discussion
\r
83 [beginKeywords]: https://github.com/isagalaev/highlight.js/commit/6c7fdea002eb3949577a85b3f7930137c7c3038d
\r
84 [php-html]: https://twitter.com/highlightjs/status/408890903017689088
\r
86 [Carlo Kok]: https://github.com/carlokok
\r
87 [Bram de Haan]: https://github.com/atelierbram
\r
88 [Daniel Kvasnička]: https://github.com/dkvasnicka
\r
89 [Dmitry Smolin]: https://github.com/dimsmol
\r
90 [Jeremy Hull]: https://github.com/sourrust
\r
91 [Seongwon Lee]: https://github.com/dlimpid
\r
92 [Jan T. Sott]: https://github.com/idleberg
\r
97 A catch-up release dealing with some of the accumulated contributions. This one
\r
98 is probably will be the last before the 8.0 which will be slightly backwards
\r
99 incompatible regarding some advanced use-cases.
\r
101 One outstanding change in this version is the addition of 6 languages to the
\r
102 [hosted script][d]: Markdown, ObjectiveC, CoffeeScript, Apache, Nginx and
\r
103 Makefile. It now weighs about 6K more but we're going to keep it under 30K.
\r
107 - OCaml by [Mehdi Dogguy][mehdid] and [Nicolas Braud-Santoni][nbraud]
\r
108 - [LiveCode Server][lcs] by [Ralf Bitter][revig]
\r
109 - Scilab by [Sylvestre Ledru][sylvestre]
\r
110 - basic support for Makefile by [Ivan Sagalaev][isagalaev]
\r
114 - Ruby's got support for characters like `?A`, `?1`, `?\012` etc. and `%r{..}`
\r
116 - Clojure now allows a function call in the beginning of s-expressions
\r
117 `(($filter "myCount") (arr 1 2 3 4 5))`.
\r
118 - Haskell's got new keywords and now recognizes more things like pragmas,
\r
119 preprocessors, modules, containers, FFIs etc. Thanks to [Zena Treep][treep]
\r
120 for the implementation and to [Jeremy Hull][sourrust] for guiding it.
\r
121 - Miscelleanous fixes in PHP, Brainfuck, SCSS, Asciidoc, CMake, Python and F#.
\r
123 [mehdid]: https://github.com/mehdid
\r
124 [nbraud]: https://github.com/nbraud
\r
125 [revig]: https://github.com/revig
\r
126 [lcs]: http://livecode.com/developers/guides/server/
\r
127 [sylvestre]: https://github.com/sylvestre
\r
128 [isagalaev]: https://github.com/isagalaev
\r
129 [treep]: https://github.com/treep
\r
130 [sourrust]: https://github.com/sourrust
\r
131 [d]: http://highlightjs.org/download/
\r
134 ## New core developers
\r
136 The latest long period of almost complete inactivity in the project coincided
\r
137 with growing interest to it led to a decision that now seems completely obvious:
\r
138 we need more core developers.
\r
140 So without further ado let me welcome to the core team two long-time
\r
141 contributors: [Jeremy Hull][] and [Oleg
\r
144 Hope now we'll be able to work through stuff faster!
\r
146 P.S. The historical commit is [here][1] for the record.
\r
148 [Jeremy Hull]: https://github.com/sourrust
\r
149 [Oleg Efimov]: https://github.com/sannis
\r
150 [1]: https://github.com/isagalaev/highlight.js/commit/f3056941bda56d2b72276b97bc0dd5f230f2473f
\r
155 This long overdue version is a snapshot of the current source tree with all the
\r
156 changes that happened during the past year. Sorry for taking so long!
\r
158 Along with the changes in code highlight.js has finally got its new home at
\r
159 <http://highlightjs.org/>, moving from its craddle on Software Maniacs which it
\r
160 outgrew a long time ago. Be sure to report any bugs about the site to
\r
161 <mailto:info@highlightjs.org>.
\r
167 - Handlebars templates by [Robin Ward][]
\r
168 - Oracle Rules Language by [Jason Jacobson][]
\r
169 - F# by [Joans Follesø][]
\r
170 - AsciiDoc and Haml by [Dan Allen][]
\r
171 - Lasso by [Eric Knibbe][]
\r
172 - SCSS by [Kurt Emch][]
\r
173 - VB.NET by [Poren Chiang][]
\r
174 - Mizar by [Kelley van Evert][]
\r
176 [Robin Ward]: https://github.com/eviltrout
\r
177 [Jason Jacobson]: https://github.com/jayce7
\r
178 [Joans Follesø]: https://github.com/follesoe
\r
179 [Dan Allen]: https://github.com/mojavelinux
\r
180 [Eric Knibbe]: https://github.com/EricFromCanada
\r
181 [Kurt Emch]: https://github.com/kemch
\r
182 [Poren Chiang]: https://github.com/rschiang
\r
183 [Kelley van Evert]: https://github.com/kelleyvanevert
\r
187 - Monokai Sublime by [noformnocontent][]
\r
188 - Railscasts by [Damien White][]
\r
189 - Obsidian by [Alexander Marenin][]
\r
190 - Docco by [Simon Madine][]
\r
191 - Mono Blue by [Ivan Sagalaev][] (uses a single color hue for everything)
\r
192 - Foundation by [Dan Allen][]
\r
194 [noformnocontent]: http://nn.mit-license.org/
\r
195 [Damien White]: https://github.com/visoft
\r
196 [Alexander Marenin]: https://github.com/ioncreature
\r
197 [Simon Madine]: https://github.com/thingsinjars
\r
198 [Ivan Sagalaev]: https://github.com/isagalaev
\r
200 Other notable changes:
\r
202 - Corrected many corner cases in CSS.
\r
203 - Dropped Python 2 version of the build tool.
\r
204 - Implemented building for the AMD format.
\r
205 - Updated Rust keywords (thanks to [Dmitry Medvinsky][]).
\r
206 - Literal regexes can now be used in language definitions.
\r
207 - CoffeeScript highlighting is now significantly more robust and rich due to
\r
208 input from [Cédric Néhémie][].
\r
210 [Dmitry Medvinsky]: https://github.com/dmedvinsky
\r
211 [Cédric Néhémie]: https://github.com/abe33
\r
216 - Since this version highlight.js no longer works in IE version 8 and older.
\r
217 It's made it possible to reduce the library size and dramatically improve code
\r
218 readability and made it easier to maintain. Time to go forward!
\r
220 - New languages: AppleScript (by [Nathan Grigg][ng] and [Dr. Drang][dd]) and
\r
221 Brainfuck (by [Evgeny Stepanischev][bolk]).
\r
223 - Improvements to existing languages:
\r
225 - interpreter prompt in Python (`>>>` and `...`)
\r
226 - @-properties and classes in CoffeeScript
\r
227 - E4X in JavaScript (by [Oleg Efimov][oe])
\r
228 - new keywords in Perl (by [Kirk Kimmel][kk])
\r
229 - big Ruby syntax update (by [Vasily Polovnyov][vast])
\r
230 - small fixes in Bash
\r
232 - Also Oleg Efimov did a great job of moving all the docs for language and style
\r
233 developers and contributors from the old wiki under the source code in the
\r
234 "docs" directory. Now these docs are nicely presented at
\r
235 <http://highlightjs.readthedocs.org/>.
\r
237 [ng]: https://github.com/nathan11g
\r
238 [dd]: https://github.com/drdrang
\r
239 [bolk]: https://github.com/bolknote
\r
240 [oe]: https://github.com/Sannis
\r
241 [kk]: https://github.com/kimmel
\r
242 [vast]: https://github.com/vast
\r
247 A regular bug-fix release without any significant new features. Enjoy!
\r
254 - [Marc Fornos][mf] made the definition for Clojure along with the matching
\r
255 style Rainbow (which, of course, works for other languages too).
\r
256 - CoffeeScript support continues to improve getting support for regular
\r
258 - Yoshihide Jimbo ported to highlight.js [five Tomorrow styles][tm] from the
\r
259 [project by Chris Kempson][tm0].
\r
260 - Thanks to [Casey Duncun][cd] the library can now be built in the popular
\r
262 - And last but not least, we've got a fair number of correctness and consistency
\r
263 fixes, including a pretty significant refactoring of Ruby.
\r
265 [mf]: https://github.com/mfornos
\r
266 [tm]: http://jmblog.github.com/color-themes-for-highlightjs/
\r
267 [tm0]: https://github.com/ChrisKempson/Tomorrow-Theme
\r
268 [cd]: https://github.com/caseman
\r
269 [amd]: http://requirejs.org/docs/whyamd.html
\r
274 The reason for the new major version update is a global change of keyword syntax
\r
275 which resulted in the library getting smaller once again. For example, the
\r
276 hosted build is 2K less than at the previous version while supporting two new
\r
281 - The library now works not only in a browser but also with [node.js][]. It is
\r
282 installable with `npm install highlight.js`. [API][] docs are available on our
\r
285 - The new unique feature (apparently) among syntax highlighters is highlighting
\r
286 *HTTP* headers and an arbitrary language in the request body. The most useful
\r
287 languages here are *XML* and *JSON* both of which highlight.js does support.
\r
288 Here's [the detailed post][p] about the feature.
\r
290 - Two new style themes: a dark "south" *[Pojoaque][]* by Jason Tate and an
\r
291 emulation of*XCode* IDE by [Angel Olloqui][ao].
\r
293 - Three new languages: *D* by [Aleksandar Ružičić][ar], *R* by [Joe Cheng][jc]
\r
294 and *GLSL* by [Sergey Tikhomirov][st].
\r
296 - *Nginx* syntax has become a million times smaller and more universal thanks to
\r
297 remaking it in a more generic manner that doesn't require listing all the
\r
298 directives in the known universe.
\r
300 - Function titles are now highlighted in *PHP*.
\r
302 - *Haskell* and *VHDL* were significantly reworked to be more rich and correct
\r
303 by their respective maintainers [Jeremy Hull][sr] and [Igor Kalnitsky][ik].
\r
305 And last but not least, many bugs have been fixed around correctness and
\r
306 language detection.
\r
308 Overall highlight.js currently supports 51 languages and 20 style themes.
\r
310 [node.js]: http://nodejs.org/
\r
311 [api]: http://softwaremaniacs.org/wiki/doku.php/highlight.js:api
\r
312 [p]: http://softwaremaniacs.org/blog/2012/05/10/http-and-json-in-highlight-js/en/
\r
313 [pojoaque]: http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html
\r
314 [ao]: https://github.com/angelolloqui
\r
315 [ar]: https://github.com/raleksandar
\r
316 [jc]: https://github.com/jcheng5
\r
317 [st]: https://github.com/tikhomirov
\r
318 [sr]: https://github.com/sourrust
\r
319 [ik]: https://github.com/ikalnitsky
\r
324 A lot of things happened in highlight.js since the last version! We've got nine
\r
325 new contributors, the discussion group came alive, and the main branch on GitHub
\r
326 now counts more than 350 followers. Here are most significant results coming
\r
327 from all this activity:
\r
329 - 5 (five!) new languages: Rust, ActionScript, CoffeeScript, MatLab and
\r
330 experimental support for markdown. Thanks go to [Andrey Vlasovskikh][av],
\r
331 [Alexander Myadzel][am], [Dmytrii Nagirniak][dn], [Oleg Efimov][oe], [Denis
\r
332 Bardadym][db] and [John Crepezzi][jc].
\r
334 - 2 new style themes: Monokai by [Luigi Maselli][lm] and stylistic imitation of
\r
335 another well-known highlighter Google Code Prettify by [Aahan Krish][ak].
\r
337 - A vast number of [correctness fixes and code refactorings][log], mostly made
\r
338 by [Oleg Efimov][oe] and [Evgeny Stepanischev][es].
\r
340 [av]: https://github.com/vlasovskikh
\r
341 [am]: https://github.com/myadzel
\r
342 [dn]: https://github.com/dnagir
\r
343 [oe]: https://github.com/Sannis
\r
344 [db]: https://github.com/btd
\r
345 [jc]: https://github.com/seejohnrun
\r
346 [lm]: http://grigio.org/
\r
347 [ak]: https://github.com/geekpanth3r
\r
348 [es]: https://github.com/bolknote
\r
349 [log]: https://github.com/isagalaev/highlight.js/commits/
\r
352 ## Version 6.1 — Solarized
\r
354 [Jeremy Hull][jh] has implemented my dream feature — a port of [Solarized][]
\r
355 style theme famous for being based on the intricate color theory to achieve
\r
356 correct contrast and color perception. It is now available for highlight.js in
\r
357 both variants — light and dark.
\r
359 This version also adds a new original style Arta. Its author pumbur maintains a
\r
360 [heavily modified fork of highlight.js][pb] on GitHub.
\r
362 [jh]: https://github.com/sourrust
\r
363 [solarized]: http://ethanschoonover.com/solarized
\r
364 [pb]: https://github.com/pumbur/highlight.js
\r
369 New major version of the highlighter has been built on a significantly
\r
370 refactored syntax. Due to this it's even smaller than the previous one while
\r
371 supporting more languages!
\r
375 - Haskell by [Jeremy Hull][sourrust]
\r
376 - Erlang in two varieties — module and REPL — made collectively by [Nikolay
\r
377 Zakharov][desh], [Dmitry Kovega][arhibot] and [Sergey Ignatov][ignatov]
\r
378 - Objective C by [Valerii Hiora][vhbit]
\r
379 - Vala by [Antono Vasiljev][antono]
\r
380 - Go by [Stephan Kountso][steplg]
\r
382 [sourrust]: https://github.com/sourrust
\r
383 [desh]: http://desh.su/
\r
384 [arhibot]: https://github.com/arhibot
\r
385 [ignatov]: https://github.com/ignatov
\r
386 [vhbit]: https://github.com/vhbit
\r
387 [antono]: https://github.com/antono
\r
388 [steplg]: https://github.com/steplg
\r
390 Also this version is marginally faster and fixes a number of small long-standing
\r
393 Developer overview of the new language syntax is available in a [blog post about
\r
394 recent beta release][beta].
\r
396 [beta]: http://softwaremaniacs.org/blog/2011/04/25/highlight-js-60-beta/en/
\r
398 P.S. New version is not yet available on a Yandex' CDN, so for now you have to
\r
399 download [your own copy][d].
\r
401 [d]: /soft/highlight/en/download/
\r
406 Fixed bugs in HTML/XML detection and relevance introduced in previous
\r
409 Also test.html now shows the second best result of language detection by
\r
415 Past weekend began with a couple of simple additions for existing languages but
\r
416 ended up in a big code refactoring bringing along nice improvements for language
\r
421 - Description of C++ has got new keywords from the upcoming [C++ 0x][] standard.
\r
422 - Description of HTML has got new tags from [HTML 5][].
\r
423 - CSS-styles have been unified to use consistent padding and also have lost
\r
424 pop-outs with names of detected languages.
\r
425 - [Igor Kalnitsky][ik] has sent two new language descriptions: CMake и VHDL.
\r
427 This makes total number of languages supported by highlight.js to reach 35.
\r
431 - Custom classes on `<pre>` tags are not being overridden anymore
\r
432 - More correct highlighting of code blocks inside non-`<pre>` containers:
\r
433 highlighter now doesn't insist on replacing them with its own container and
\r
434 just replaces the contents.
\r
435 - Small fixes in browser compatibility and heuristics.
\r
437 [c++ 0x]: http://ru.wikipedia.org/wiki/C%2B%2B0x
\r
438 [html 5]: http://en.wikipedia.org/wiki/HTML5
\r
439 [ik]: http://kalnitsky.org.ua/
\r
443 The most significant change is the ability to include language submodes right
\r
444 under `contains` instead of defining explicit named submodes in the main array:
\r
449 {begin: '\\n', end: hljs.IMMEDIATE_RE}
\r
452 This is useful for auxiliary modes needed only in one place to define parsing.
\r
453 Note that such modes often don't have `className` and hence won't generate a
\r
454 separate `<span>` in the resulting markup. This is similar in effect to
\r
455 `noMarkup: true`. All existing languages have been refactored accordingly.
\r
457 Test file test.html has at last become a real test. Now it not only puts the
\r
458 detected language name under the code snippet but also tests if it matches the
\r
459 expected one. Test summary is displayed right above all language snippets.
\r
464 Fine people at [Yandex][] agreed to host highlight.js on their big fast servers.
\r
467 [yandex]: http://yandex.com/
\r
468 [l]: http://softwaremaniacs.org/soft/highlight/en/download/
\r
471 ## Version 5.10 — "Paris".
\r
473 Though I'm on a vacation in Paris, I decided to release a new version with a
\r
474 couple of small fixes:
\r
476 - Tomas Vitvar discovered that TAB replacement doesn't always work when used
\r
477 with custom markup in code
\r
478 - SQL parsing is even more rigid now and doesn't step over SmallTalk in tests
\r
483 A long-awaited version is finally released.
\r
487 - Andrew Fedorov made a definition for Lua
\r
488 - a long-time highlight.js contributor [Peter Leonov][pl] made a definition for
\r
490 - [Vladimir Moskva][vm] made a definition for TeX
\r
492 [pl]: http://kung-fu-tzu.ru/
\r
493 [vm]: http://fulc.ru/
\r
495 Fixes for existing languages:
\r
497 - [Loren Segal][ls] reworked the Ruby definition and added highlighting for
\r
498 [YARD][] inline documentation
\r
499 - the definition of SQL has become more solid and now it shouldn't be overly
\r
500 greedy when it comes to language detection
\r
502 [ls]: http://gnuu.org/
\r
503 [yard]: http://yardoc.org/
\r
505 The highlighter has become more usable as a library allowing to do highlighting
\r
506 from initialization code of JS frameworks and in ajax methods (see.
\r
509 Also this version drops support for the [WordPress][wp] plugin. Everyone is
\r
510 welcome to [pick up its maintenance][p] if needed.
\r
512 [wp]: http://wordpress.org/
\r
513 [p]: http://bazaar.launchpad.net/~isagalaev/+junk/highlight/annotate/342/src/wp_highlight.js.php
\r
518 - Jan Berkel has contributed a definition for Scala. +1 to hotness!
\r
519 - All CSS-styles are rewritten to work only inside `<pre>` tags to avoid
\r
520 conflicts with host site styles.
\r
525 Fixed escaping of quotes in VBScript strings.
\r
530 This version brings a small change: now .ini-files allow digits, underscores and
\r
531 square brackets in key names.
\r
536 Fixed small but upsetting bug in the packer which caused incorrect highlighting
\r
537 of explicitly specified languages. Thanks to Andrew Fedorov for precise
\r
543 The version to fulfil old promises.
\r
545 The most significant change is that highlight.js now preserves custom user
\r
546 markup in code along with its own highlighting markup. This means that now it's
\r
547 possible to use, say, links in code. Thanks to [Vladimir Dolzhenko][vd] for the
\r
548 [initial proposal][1] and for making a proof-of-concept patch.
\r
550 Also in this version:
\r
552 - [Vasily Polovnyov][vp] has sent a GitHub-like style and has implemented
\r
553 support for CSS @-rules and Ruby symbols.
\r
554 - Yura Zaripov has sent two styles: Brown Paper and School Book.
\r
555 - Oleg Volchkov has sent a definition for [Parser 3][p3].
\r
557 [1]: http://softwaremaniacs.org/forum/highlightjs/6612/
\r
558 [p3]: http://www.parser.ru/
\r
559 [vp]: http://vasily.polovnyov.ru/
\r
560 [vd]: http://dolzhenko.blogspot.com/
\r
565 - at last it's possible to replace indentation TABs with something sensible (e.g. 2 or 4 spaces)
\r
566 - new keywords and built-ins for 1C by Sergey Baranov
\r
567 - a couple of small fixes to Apache highlighting
\r
572 This is one of those nice version consisting entirely of new and shiny
\r
575 - [Vladimir Ermakov][vooon] created highlighting for AVR Assembler
\r
576 - [Ruslan Keba][rukeba] created highlighting for Apache config file. Also his
\r
577 original visual style for it is now available for all highlight.js languages
\r
578 under the name "Magula".
\r
579 - [Shuen-Huei Guan][drake] (aka Drake) sent new keywords for RenderMan
\r
580 languages. Also thanks go to [Konstantin Evdokimenko][ke] for his advice on
\r
583 [vooon]: http://vehq.ru/about/
\r
584 [rukeba]: http://rukeba.com/
\r
585 [drake]: http://drakeguan.org/
\r
586 [ke]: http://k-evdokimenko.moikrug.ru/
\r
591 The main change in the new major version of highlight.js is a mechanism for
\r
592 packing several languages along with the library itself into a single compressed
\r
593 file. Now sites using several languages will load considerably faster because
\r
594 the library won't dynamically include additional files while loading.
\r
596 Also this version fixes a long-standing bug with Javascript highlighting that
\r
597 couldn't distinguish between regular expressions and division operations.
\r
599 And as usually there were a couple of minor correctness fixes.
\r
601 Great thanks to all contributors! Keep using highlight.js.
\r
606 This version comes with two contributions from [Jason Diamond][jd]:
\r
608 - language definition for C# (yes! it was a long-missed thing!)
\r
609 - Visual Studio-like highlighting style
\r
611 Plus there are a couple of minor bug fixes for parsing HTML and XML attributes.
\r
613 [jd]: http://jason.diamond.name/weblog/
\r
618 The biggest news is highlighting for Lisp, courtesy of Vasily Polovnyov. It's
\r
619 somewhat experimental meaning that for highlighting "keywords" it doesn't use
\r
620 any pre-defined set of a Lisp dialect. Instead it tries to highlight first word
\r
621 in parentheses wherever it makes sense. I'd like to ask people programming in
\r
622 Lisp to confirm if it's a good idea and send feedback to [the forum][f].
\r
626 - Smalltalk was excluded from DEFAULT_LANGUAGES to save traffic
\r
627 - [Vladimir Epifanov][voldmar] has implemented javascript style switcher for
\r
629 - comments now allowed inside Ruby function definition
\r
630 - [MEL][] language from [Shuen-Huei Guan][drake]
\r
631 - whitespace now allowed between `<pre>` and `<code>`
\r
632 - better auto-detection of C++ and PHP
\r
633 - HTML allows embedded VBScript (`<% .. %>`)
\r
635 [f]: http://softwaremaniacs.org/forum/highlightjs/
\r
636 [voldmar]: http://voldmar.ya.ru/
\r
637 [mel]: http://en.wikipedia.org/wiki/Maya_Embedded_Language
\r
638 [drake]: http://drakeguan.org/
\r
646 - DOS bat-files from Alexander Makarov (Sam)
\r
647 - Diff files from Vasily Polovnyov
\r
648 - Ini files from myself though initial idea was from Sam
\r
652 - Zenburn from Vladimir Epifanov, this is an imitation of a
\r
653 [well-known theme for Vim][zenburn].
\r
654 - Ascetic from myself, as a realization of ideals of non-flashy highlighting:
\r
655 just one color in only three gradations :-)
\r
657 In other news. [One small bug][bug] was fixed, built-in keywords were added for
\r
658 Python and C++ which improved auto-detection for the latter (it was shame that
\r
659 [my wife's blog][alenacpp] had issues with it from time to time). And lastly
\r
660 thanks go to Sam for getting rid of my stylistic comments in code that were
\r
661 getting in the way of [JSMin][].
\r
663 [zenburn]: http://en.wikipedia.org/wiki/Zenburn
\r
664 [alenacpp]: http://alenacpp.blogspot.com/
\r
665 [bug]: http://softwaremaniacs.org/forum/viewtopic.php?id=1823
\r
666 [jsmin]: http://code.google.com/p/jsmin-php/
\r
671 New major version is a result of vast refactoring and of many contributions.
\r
673 Visible new features:
\r
675 - Highlighting of embedded languages. Currently is implemented highlighting of
\r
676 Javascript and CSS inside HTML.
\r
677 - Bundled 5 ready-made style themes!
\r
679 Invisible new features:
\r
681 - Highlight.js no longer pollutes global namespace. Only one object and one
\r
682 function for backward compatibility.
\r
683 - Performance is further increased by about 15%.
\r
685 Changing of a major version number caused by a new format of language definition
\r
686 files. If you use some third-party language files they should be updated.
\r
691 A very nice version in my opinion fixing a number of small bugs and slightly
\r
692 increased speed in a couple of corner cases. Thanks to everybody who reports
\r
693 bugs in he [forum][f] and by email!
\r
695 There is also a new language — XML. A custom XML formerly was detected as HTML
\r
696 and didn't highlight custom tags. In this version I tried to make custom XML to
\r
697 be detected and highlighted by its own rules. Which by the way include such
\r
698 things as CDATA sections and processing instructions (`<? ... ?>`).
\r
700 [f]: http://softwaremaniacs.org/forum/viewforum.php?id=6
\r
705 [Vladimir Gubarkov][xonix] has provided an interesting and useful addition.
\r
706 File export.html contains a little program that shows and allows to copy and
\r
707 paste an HTML code generated by the highlighter for any code snippet. This can
\r
708 be useful in situations when one can't use the script itself on a site.
\r
711 [xonix]: http://xonixx.blogspot.com/
\r
714 ## Version 3.2 consists completely of contributions:
\r
716 - Vladimir Gubarkov has described SmallTalk
\r
717 - Yuri Ivanov has described 1C
\r
718 - Peter Leonov has packaged the highlighter as a Firefox extension
\r
719 - Vladimir Ermakov has compiled a mod for phpBB
\r
721 Many thanks to you all!
\r
726 Three new languages are available: Django templates, SQL and Axapta. The latter
\r
727 two are sent by [Dmitri Roudakov][1]. However I've almost entirely rewrote an
\r
728 SQL definition but I'd never started it be it from the ground up :-)
\r
730 The engine itself has got a long awaited feature of grouping keywords
\r
731 ("keyword", "built-in function", "literal"). No more hacks!
\r
733 [1]: http://roudakov.ru/
\r
738 It is major mainly because now highlight.js has grown large and has become
\r
739 modular. Now when you pass it a list of languages to highlight it will
\r
740 dynamically load into a browser only those languages.
\r
744 - Konstantin Evdokimenko of [RibKit][] project has created a highlighting for
\r
745 RenderMan Shading Language and RenderMan Interface Bytestream. Yay for more
\r
747 - Heuristics for C++ and HTML got better.
\r
748 - I've implemented (at last) a correct handling of backslash escapes in C-like
\r
751 There is also a small backwards incompatible change in the new version. The
\r
752 function initHighlighting that was used to initialize highlighting instead of
\r
753 initHighlightingOnLoad a long time ago no longer works. If you by chance still
\r
754 use it — replace it with the new one.
\r
756 [RibKit]: http://ribkit.sourceforge.net/
\r
761 Highlight.js is a parser, not just a couple of regular expressions. That said
\r
762 I'm glad to announce that in the new version 2.9 has support for:
\r
764 - in-string substitutions for Ruby -- `#{...}`
\r
765 - strings from from numeric symbol codes (like #XX) for Delphi
\r
770 A maintenance release with more tuned heuristics. Fully backwards compatible.
\r
775 - Nikita Ledyaev presents highlighting for VBScript, yay!
\r
776 - A couple of bugs with escaping in strings were fixed thanks to Mickle
\r
777 - Ongoing tuning of heuristics
\r
779 Fixed bugs were rather unpleasant so I encourage everyone to upgrade!
\r
784 - Peter Leonov provides another improved highlighting for Perl
\r
785 - Javascript gets a new kind of keywords — "literals". These are the words
\r
786 "true", "false" and "null"
\r
788 Also highlight.js homepage now lists sites that use the library. Feel free to
\r
789 add your site by [dropping me a message][mail] until I find the time to build a
\r
792 [mail]: mailto:Maniac@SoftwareManiacs.Org
\r
797 This version fixes IE breakage in previous version. My apologies to all who have
\r
798 already downloaded that one!
\r
803 - added highlighting for Javascript
\r
804 - at last fixed parsing of Delphi's escaped apostrophes in strings
\r
805 - in Ruby fixed highlighting of keywords 'def' and 'class', same for 'sub' in
\r
811 - Ruby support by [Anton Kovalyov][ak]
\r
812 - speed increased by orders of magnitude due to new way of parsing
\r
813 - this same way allows now correct highlighting of keywords in some tricky
\r
814 places (like keyword "End" at the end of Delphi classes)
\r
816 [ak]: http://anton.kovalyov.net/
\r
821 Version 1.0 of javascript syntax highlighter is released!
\r
823 It's the first version available with English description. Feel free to post
\r
824 your comments and question to [highlight.js forum][forum]. And don't be afraid
\r
825 if you find there some fancy Cyrillic letters -- it's for Russian users too :-)
\r
827 [forum]: http://softwaremaniacs.org/forum/viewforum.php?id=6
\r