Skip to content

Commit

Permalink
Update highlight.js to version 7.5 (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
cloose committed Nov 25, 2013
1 parent 8da315f commit f911496
Show file tree
Hide file tree
Showing 35 changed files with 1,103 additions and 57 deletions.
36 changes: 30 additions & 6 deletions app/scripts/highlight.js/README.md
Expand Up @@ -24,7 +24,7 @@ If you use different markup or need to apply highlighting dynamically, read

- You can download your own customized version of "highlight.pack.js" or
use the hosted one as described on the download page:
<http://softwaremaniacs.org/soft/highlight/en/download/>
<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
Expand All @@ -42,7 +42,7 @@ installable from NPM:

Alternatively, you can build it from the source with only languages you need:

python tools/build.py -tnode lang1 lang2 ..
python3 tools/build.py -tnode lang1 lang2 ..

Using the library:

Expand All @@ -56,6 +56,31 @@ hljs.highlight(lang, code).value;
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;

// Automatic language detection
hljs.highlightAuto(code).value;
});
```


## Tab replacement

You can replace TAB ('\x09') characters used for indentation in your code
Expand Down Expand Up @@ -135,9 +160,8 @@ on a site.

## Meta

- Version: 7.3
- URL: http://softwaremaniacs.org/soft/highlight/en/
- Author: Ivan Sagalaev (<maniac@softwaremaniacs.org>)
- Version: 7.5
- URL: http://highlightjs.org/

For the license terms see LICENSE files.
For the list of contributors see AUTHORS.en.txt file.
For authors and contributors see AUTHORS.en.txt file.
35 changes: 29 additions & 6 deletions app/scripts/highlight.js/README.ru.md
Expand Up @@ -26,7 +26,7 @@ Highlight.js нужен для подсветки синтаксиса в при

- Вы можете скачать собственную версию "highlight.pack.js" или сослаться
на захостенный файл, как описано на странице загрузки:
<http://softwaremaniacs.org/soft/highlight/download/>
<http://highlightjs.org/download/>

- Стилевые темы можно найти в загруженном архиве или также использовать
захостенные. Чтобы сделать собственный стиль для своего сайта, вам
Expand All @@ -45,7 +45,7 @@ Highlight.js можно использовать в node.js. Библиотек

Также её можно собрать из исходников с только теми языками, которые нужны:

python tools/build.py -tnode lang1 lang2 ..
python3 tools/build.py -tnode lang1 lang2 ..

Использование библиотеки:

Expand All @@ -60,6 +60,30 @@ hljs.highlightAuto(code).value;
```


## AMD

Highlight.js можно использовать с загрузчиком AMD-модулей. Для этого его
нужно собрать из исходников следующей командой:

```bash
$ python3 tools/build.py -tamd lang1 lang2 ..
```

Она создаст файл `build/highlight.pack.js`, который является загружаемым
AMD-модулем и содержит все выбранные при сборке языки. Используется он так:

```javascript
require(["highlight.js/build/highlight.pack"], function(hljs){

// Если вы знаете язык
hljs.highlight(lang, code).value;

// Автоопределение языка
hljs.highlightAuto(code).value;
});
```


## Замена TABов

Также вы можете заменить символы TAB ('\x09'), используемые для отступов, на
Expand Down Expand Up @@ -141,9 +165,8 @@ highlight.js.

## Координаты

- Версия: 7.3
- URL: http://softwaremaniacs.org/soft/highlight/
- Автор: Иван Сагалаев (<maniac@softwaremaniacs.org>)
- Версия: 7.5
- URL: http://highlightjs.org/

Лицензионное соглашение читайте в файле LICENSE.
Список соавторов читайте в файле AUTHORS.ru.txt
Список авторов и соавторов читайте в файле AUTHORS.ru.txt

0 comments on commit f911496

Please sign in to comment.