Skip to content

Commit

Permalink
Some more fixes for heuristics in readme, translate to ru
Browse files Browse the repository at this point in the history
  • Loading branch information
Sannis committed Feb 8, 2014
1 parent 4cfebcd commit 7ebbd94
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,21 +136,23 @@ This means that in short fragments the probability of an error is high
language explicitly by assigning a class to the `<code>` element:

```html
<pre><code class="html">...</code></pre>
<pre><code class="language-html">...</code></pre>
```

You can use class names prefixed with "lang-", or "language-" as
[recommended in the HTML Living Standard][sem]. Classes also can be assigned
to the `<pre>` element.

[sem]: http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-code-element
You can use class names prefixed with "language-" (or "lang-")
as [recommended in the HTML Living Standard][sem],
for example "language-html" or "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>
```

[sem]: http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-code-element


## Export

File export.html contains a little program that allows you to paste in a code
Expand Down
13 changes: 8 additions & 5 deletions README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,19 +140,22 @@ $('div.code').each(function(i, e) {hljs.highlightBlock(e)});
его название в виде класса к элементу `<code>`:

```html
<pre><code class="html">...</code></pre>
<pre><code class="language-html">...</code></pre>
```

Можно использовать рекомендованные в HTML5 названия классов:
"language-html", "language-php". Также можно назначать классы на элемент
`<pre>`.
Можно использовать [рекомендованные в HTML5][sem] названия классов
с префиксом "language-" (или "lang-"),
например "language-html" или "language-php".
Также можно назначать классы на элемент `<pre>`.

Чтобы запретить расцветку фрагмента вообще, используется класс "no-highlight":
Чтобы запретить расцветку фрагмента, используется класс "no-highlight":

```html
<pre><code class="no-highlight">...</code></pre>
```

[sem]: http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-code-element


## Экспорт

Expand Down

0 comments on commit 7ebbd94

Please sign in to comment.