Permalink
Browse files

changing syntax highlighter

  • Loading branch information...
1 parent 08081ba commit 92bc7f1745b42c71c13f8c03980dcecf78b13295 @thatmattbone committed Apr 11, 2012
Showing with 3,767 additions and 3,308 deletions.
  1. BIN presentation/expression_tree.png
  2. +55 −0 presentation/highlight/AUTHORS.en.txt
  3. +55 −0 presentation/highlight/AUTHORS.ru.txt
  4. +24 −0 presentation/highlight/LICENSE
  5. +139 −0 presentation/highlight/README.md
  6. +144 −0 presentation/highlight/README.ru.md
  7. +497 −0 presentation/highlight/classref.txt
  8. +87 −0 presentation/highlight/export.html
  9. +643 −0 presentation/highlight/highlight.js
  10. +1 −0 presentation/highlight/highlight.pack.js
  11. +90 −0 presentation/highlight/languages/python.js
  12. +142 −0 presentation/highlight/styles/googlecode.css
  13. +1,845 −0 presentation/highlight/test.html
  14. +0 −165 presentation/highlighter/LGPLv3.txt
  15. BIN presentation/highlighter/clipboard.swf
  16. BIN presentation/highlighter/help.png
  17. BIN presentation/highlighter/magnifier.png
  18. BIN presentation/highlighter/page_white_code.png
  19. BIN presentation/highlighter/page_white_copy.png
  20. BIN presentation/highlighter/printer.png
  21. +0 −61 presentation/highlighter/shBrushAS3.js
  22. +0 −66 presentation/highlighter/shBrushBash.js
  23. +0 −67 presentation/highlighter/shBrushCSharp.js
  24. +0 −102 presentation/highlighter/shBrushColdFusion.js
  25. +0 −99 presentation/highlighter/shBrushCpp.js
  26. +0 −93 presentation/highlighter/shBrushCss.js
  27. +0 −57 presentation/highlighter/shBrushDelphi.js
  28. +0 −43 presentation/highlighter/shBrushDiff.js
  29. +0 −54 presentation/highlighter/shBrushErlang.js
  30. +0 −69 presentation/highlighter/shBrushGroovy.js
  31. +0 −52 presentation/highlighter/shBrushJScript.js
  32. +0 −59 presentation/highlighter/shBrushJava.js
  33. +0 −60 presentation/highlighter/shBrushJavaFX.js
  34. +0 −74 presentation/highlighter/shBrushPerl.js
  35. +0 −91 presentation/highlighter/shBrushPhp.js
  36. +0 −35 presentation/highlighter/shBrushPlain.js
  37. +0 −76 presentation/highlighter/shBrushPowerShell.js
  38. +0 −66 presentation/highlighter/shBrushPython.js
  39. +0 −57 presentation/highlighter/shBrushRuby.js
  40. +0 −53 presentation/highlighter/shBrushScala.js
  41. +0 −68 presentation/highlighter/shBrushSql.js
  42. +0 −58 presentation/highlighter/shBrushVb.js
  43. +0 −71 presentation/highlighter/shBrushXml.js
  44. +0 −330 presentation/highlighter/shCore.css
  45. +0 −30 presentation/highlighter/shCore.js
  46. +0 −30 presentation/highlighter/shLegacy.js
  47. +0 −173 presentation/highlighter/shThemeDefault.css
  48. +0 −162 presentation/highlighter/shThemeDjango.css
  49. +0 −190 presentation/highlighter/shThemeEclipse.css
  50. +0 −161 presentation/highlighter/shThemeEmacs.css
  51. +0 −163 presentation/highlighter/shThemeFadeToGrey.css
  52. +0 −161 presentation/highlighter/shThemeMidnight.css
  53. +0 −161 presentation/highlighter/shThemeRDark.css
  54. +45 −51 presentation/index.html
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,55 @@
+Syntax highlighting with language autodetection.
+
+URL: http://softwaremaniacs.org/soft/highlight/en/
+
+Original author and current maintainer:
+Ivan Sagalaev <maniac@softwaremaniacs.org>
+
+Contributors:
+
+- Peter Leonov <gojpeg@gmail.com>
+- Victor Karamzin <Victor.Karamzin@enterra-inc.com>
+- Vsevolod Solovyov <vsevolod.solovyov@gmail.com>
+- Anton Kovalyov <anton@kovalyov.net>
+- Nikita Ledyaev <lenikita@yandex.ru>
+- Konstantin Evdokimenko <qewerty@gmail.com>
+- Dmitri Roudakov <dmitri@roudakov.ru>
+- Yuri Ivanov <ivanov@supersoft.ru>
+- Vladimir Ermakov <vooon341@mail.ru>
+- Vladimir Gubarkov <xonixx@gmail.com>
+- Brian Beck <exogen@gmail.com>
+- MajestiC <majestic2k@gmail.com>
+- Vasily Polovnyov <vast@whiteants.net>
+- Vladimir Epifanov <voldmar@voldmar.ru>
+- Alexander Makarov (http://rmcreative.ru/)
+- Vah <vahtenberg@gmail.com>
+- Shuen-Huei Guan <drake.guan@gmail.com>
+- Jason Diamond <jason@diamond.name>
+- Michal Gabrukiewicz <mgabru@gmail.com>
+- Ruslan Keba <rukeba@gmail.com>
+- Sergey Baranov <segyrn@yandex.ru>
+- Zaripov Yura <yur4ik7@ukr.net>
+- Oleg Volchkov <oleg@volchkov.net>
+- Vasily Mikhailitchenko <vaskas@programica.ru>
+- Jan Berkel <jan.berkel@gmail.com>
+- Vladimir Moskva <vladmos@gmail.com>
+- Loren Segal <lsegal@soen.ca>
+- Andrew Fedorov <dmmdrs@mail.ru>
+- Igor Kalnitsky <igor.kalnitsky@gmail.com>
+- Jeremy Hull <sourdrums@gmail.com>
+- Valerii Hiora <valerii.hiora@gmail.com>
+- Nikolay Zakharov <nikolay.desh@gmail.com>
+- Dmitry Kovega <arhibot@gmail.com>
+- Sergey Ignatov <sergey@ignatov.spb.su>
+- Antono Vasiljev <self@antono.info>
+- Stephan Kountso <steplg@gmail.com>
+- pumbur <pumbur@pumbur.net>
+- John Crepezzi <john.crepezzi@gmail.com>
+- Andrey Vlasovskikh <andrey.vlasovskikh@gmail.com>
+- Alexander Myadzel <myadzel@gmail.com>
+- Evgeny Stepanischev <imbolk@gmail.com>
+- Dmytrii Nagirniak <dnagir@gmail.com>
+- Oleg Efimov <efimovov@gmail.com>
+- Luigi Maselli <grigio.org@gmail.com>
+- Denis Bardadym <bardadymchik@gmail.com>
+- Aahan Krish <geekpanth3r@gmail.com>
@@ -0,0 +1,55 @@
+Подсветка синтаксиса с автоопределением языка.
+
+URL: http://softwaremaniacs.org/soft/highlight/
+
+Первоначальный автор и ведущий проекта:
+Иван Сагалаев <maniac@softwaremaniacs.org>
+
+Внесли свой вклад:
+
+- Петр Леонов <gojpeg@gmail.com>
+- Виктор Карамзин <Victor.Karamzin@enterra-inc.com>
+- Всеволод Соловьёв <vsevolod.solovyov@gmail.com>
+- Антон Ковалёв <anton@kovalyov.net>
+- Никита Ледяев <lenikita@yandex.ru>
+- Константин Евдокименко <qewerty@gmail.com>
+- Дмитрий Рудаков <dmitri@roudakov.ru>
+- Юрий Иванов <ivanov@supersoft.ru>
+- Владимир Ермаков <vooon341@mail.ru>
+- Владимир Губарьков <xonixx@gmail.com>
+- Брайан Бек <exogen@gmail.com>
+- MajestiC <majestic2k@gmail.com>
+- Василий Половнёв <vast@whiteants.net>
+- Владимир Епифанов <voldmar@voldmar.ru>
+- Александр Макаров (http://rmcreative.ru/)
+- Vah <vahtenberg@gmail.com>
+- Шуэн-Хуэй Гуан <drake.guan@gmail.com>
+- Джейсон Даймонд <jason@diamond.name>
+- Михал Габрукевич <mgabru@gmail.com>
+- Руслан Кеба <rukeba@gmail.com>
+- Сергей Баранов <segyrn@yandex.ru>
+- Зарипов Юра <yur4ik7@ukr.net>
+- Олег Волчков <oleg@volchkov.net>
+- Василий Михайличенко <vaskas@programica.ru>
+- Ян Беркель <jan.berkel@gmail.com>
+- Владимир Москва <vladmos@gmail.com>
+- Лорен Сегал <lsegal@soen.ca>
+- Андрей Фёдоров <dmmdrs@mail.ru>
+- Игорь Кальницкий <igor.kalnitsky@gmail.com>
+- Джереми Халл <sourdrums@gmail.com>
+- Валерий Хиора <valerii.hiora@gmail.com>
+- Николай Захаров <nikolay.desh@gmail.com>
+- Дмитрий Ковега <arhibot@gmail.com>
+- Сергей Игнатов <sergey@ignatov.spb.su>
+- Антоно Васильев <self@antono.info>
+- Степан Кунцьо <steplg@gmail.com>
+- pumbur <pumbur@pumbur.net>
+- Джон Крепецци <john.crepezzi@gmail.com>
+- Андрей Власовских <andrey.vlasovskikh@gmail.com>
+- Александр Мядзель <myadzel@gmail.com>
+- Евгений Степанищев <imbolk@gmail.com>
+- Дмитрий Нагирняк <dnagir@gmail.com>
+- Олег Ефимов <efimovov@gmail.com>
+- Луиджи Мазелли <grigio.org@gmail.com>
+- Денис Бардадым <bardadymchik@gmail.com>
+- Аахан Криш <geekpanth3r@gmail.com>
@@ -0,0 +1,24 @@
+Copyright (c) 2006, Ivan Sagalaev
+All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of highlight.js nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,139 @@
+# 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.
+
+Autodetection can be fine tuned when it fails by itself (see "Heuristics").
+
+
+## Installation and usage
+
+The download package includes the file "highlight.pack.js" which is a full
+compressed version of the library intended for use in production. All
+uncompressed source files are also available, feel free to look into them!
+
+The script is installed by linking to a single file and making a single
+initialization call:
+
+```html
+<script type="text/javascript" src="highlight.pack.js"></script>
+<script type="text/javascript">
+ hljs.initHighlightingOnLoad();
+</script>
+```
+
+Also 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:
+
+```html
+<script type="text/javascript">
+ hljs.tabReplace = ' '; // 4 spaces
+ // ... or
+ hljs.tabReplace = '<span class="indent">\t</span>';
+
+ hljs.initHighlightingOnLoad();
+</script>
+```
+
+The script looks in your page for fragments `<pre><code>...</code></pre>`
+that are traditionally used to mark up code examples. Their content is
+marked up by logical pieces with defined class names.
+
+
+### Custom initialization
+
+If you use different markup for code blocks you can initialize them manually
+with `highlightBlock(code, tabReplace)` function. It takes a DOM element
+containing the code to highlight and optionally a string with which to replace
+TAB characters.
+
+Initialization using, for example, jQuery might look like this:
+
+```javascript
+$(document).ready(function() {
+ $('pre code').each(function(i, e) {hljs.highlightBlock(e, ' ')});
+});
+```
+
+If your code container relies on `<br>` tags instead of line breaks (i.e. if
+it's not `<pre>`) pass `true` into third parameter of `highlightBlock`:
+
+```javascript
+$('div.code').each(function(i, e) {hljs.highlightBlock(e, null, true)});
+```
+
+### Styling
+
+Elements of code marked up with classes can be styled as desired:
+
+```css
+.comment {
+ color: gray;
+}
+
+.keyword {
+ font-weight: bold;
+}
+
+.python .string {
+ color: blue;
+}
+
+.html .atribute .value {
+ color: green;
+}
+```
+
+Highlight.js comes with several style themes located in "styles" directory that
+can be used directly or as a base for your own experiments.
+
+**Note**: provided styles work for code defined inside `<pre>` blocks. If you use
+custom markup you should modify styles accordingly.
+
+For full reference list of classes see [classref.txt][cr].
+
+[cr]: http://github.com/isagalaev/highlight.js/blob/master/classref.txt
+
+
+## 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.
+
+
+## Heuristics
+
+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:
+
+```html
+<pre><code class="html">...</code></pre>
+```
+
+You can use class names recommended in HTML5: "language-html",
+"language-php". Classes also can be assigned to the `<pre>` element.
+
+To disable highlighting of a fragment altogether use "no-highlight" class:
+
+```html
+<pre><code class="no-highlight">...</code></pre>
+```
+
+## Meta
+
+- Version: 6.2
+- URL: http://softwaremaniacs.org/soft/highlight/en/
+- Author: Ivan Sagalaev (<maniac@softwaremaniacs.org>)
+
+For the license terms see LICENSE files.
+For the list of contributors see AUTHORS.en.txt file.
Oops, something went wrong.

0 comments on commit 92bc7f1

Please sign in to comment.